Open the File Manager GUI from the Command Line
Open a file browser GUI in any directory. Add the following to your .bashrc:
case "$OSTYPE" in
cygwin) gui() { explorer "${1:-.}"; } ;;
linux-gnu) gui() { nautilus "${1:-.}"; } ;;
darwin*) gui() { open "${1:-.}"; } ;;
*) echo 'Unknown file manager.' >&2 ;;
esac
Examples:
# Open the present working directory.
gui
# Open the home directory.
gui ~
Written by Stephen Niedzielski
Related protips
3 Responses
OS X support
case "$OSTYPE" in
cygwin) gui() { explorer "${1:-.}"; } ;;
linux-gnu) gui() { nautilus "${1:-.}"; } ;;
darwin11.0) gui() { open "${1:-.}"; } ;;
*) echo 'Unknown file manager.' >&2 ;;
esac
over 1 year ago
·
Thanks! Tip updated for OS X.
over 1 year ago
·
I would go with thunar for linux.
over 1 year ago
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Related Tags
#bash
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#