#protip: Terminal to Finder and back again

January 1st, 2017. Tagged: mac

Sometimes you browse your files in Finder and want to do some stuff on the command line with these same files. Opening Terminal and navigating to the same file location is lame.

Finder-to-Terminal

You can simply drag the icon of the file or folder in mind...

1

...and drop it into a conveniently located nearby Terminal window.

The result is

2

As you see, the path to the file/folder is now in Terminal. Your cursor is at the end. CTRL+A moves the cursor to the front, so you can type cd for example and navigate to this directory.

Same happens when you drag the icon of the current folder, the one in the title of the Finder window:

3

Drag that son of a gun and drop into Terminal.

Update: there's another way, see

Terminal-to-Finder

Once at the location you're happy at in your Terminal, just type open . et voilà!

4

Where by voilà I mean a Finder window opens.

Tell your friends about this post: Facebook, Twitter, Google+

Sorry, comments disabled and hidden due to excessive spam. Working on restoring the existing comments...

Meanwhile, hit me up on twitter @stoyanstefanov