macOS Terminal trick: Open current directory in Finder

A cool Terminal trick from Brett Terpstra: Add the line below to your .bash_profile file. Then when you type f in Terminal, and it will open the current directory in Finder.

f() { open -a "Finder" "${1-.}"; }

You can also pass a directory name to the command, and it will open that directory.

Previous PostNext Post
Previous PostNext Post