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...
...and drop it into a conveniently located nearby Terminal window.
The result is
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:
Drag that son of a gun and drop into Terminal.
Update: there's another way, see
@stoyanstefanov or right-click folder and do “New Terminal at Folderâ€: https://t.co/NbEIJumAbD
— Felix Turner (@felixturner) January 4, 2017
Terminal-to-Finder
Once at the location you're happy at in your Terminal, just type open .
et voilà !
Where by voilà I mean a Finder window opens.
Comments? Find me on BlueSky, Mastodon, LinkedIn, Threads, Twitter