3 ms·
> How do you copy-paste file or folder paths between terminal and Finder? Anyone? Drag the file or folder from Finder to your terminal to copy the path. To o
by w0de0 5y ago
> How do you copy-paste file or folder paths between terminal and Finder? Anyone?
Drag the file or folder from Finder to your terminal to copy the path.
To open a file or folder in Finder from your terminal simply run `open <path>`.
The open command also works with any url whose protocol has a registered handler, like slack:// or https:// https://. With a path the file:// protocol is assumed, and Finder is its handler. Moreover since this is a unix system with good documentation, `man open` will help you with more advanced usage.
- quantified 5y agoWas hoping not to need to take my hands off the keyboard and use a click-drag gesture? Unfriendly to force switching. Note that these are special gestures for terminal and Finder (which I did specially request). A generalized copy and paste would be even friendlier. Thank you for the open command mention. Suppose it's a path I'm trying to bring to a File Open or File Close dialog?