Skip to content

Instantly share code, notes, and snippets.

@garrett
Last active December 19, 2015 16:19
Show Gist options
  • Save garrett/5983120 to your computer and use it in GitHub Desktop.
Save garrett/5983120 to your computer and use it in GitHub Desktop.
Quickly open the folder of a file (great for searches) using this script. Put this very simple bash script in your Nautilus scripts folder (~/.local/share/nautilus/scripts/) Right click, go to scripts, then "Show Containing Folder" to open a Nautilus window for things like search results, so you can figure out where the file came from and see ot…
#!/bin/bash
# Licensed under CC0 / Public Domain
# http://creativecommons.org/publicdomain/zero/1.0/
for i in $NAUTILUS_SCRIPT_SELECTED_URIS; do
nautilus $i;
done;
@garrett
Copy link
Author

garrett commented Jul 12, 2013

The file doesn't need an extension; it just needs to be chmod +x before it shows up.

Yes, you should name the file with the spaces and everything.

@ebassi
Copy link

ebassi commented Jul 12, 2013

this should probably be in the actual menu for searches. :-)

@garrett
Copy link
Author

garrett commented Sep 23, 2013

@ebassi: +1 — I agree (:

@garrett
Copy link
Author

garrett commented Oct 22, 2013

This functionality has natively landed in GNOME 3.10, by-the-way, rendering this script obsolete in new GNOME versions. Hooray!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment