Copy a File or Folder Path to the Terminal by Dragging and Dropping
Did you know you can quickly copy a files path to the Terminal just by dragging and dropping the folder or file into the Terminal window? Try it out, open any terminal window then take something from the Finder and drop it into that Terminal, it’ll instantly print out the full path to the file, effectively copying the file path from the Macs Finder GUI to the command line.
By itself it will only print the directory structures path, it won’t execute without hitting the RETURN key (which, unless the file/folder path is prefixed with some compatible command string anyway, it wouldn’t do anything).
This is particularly helpful when a file is located in an obscure location that you happen to already in within the Finder of Mac OS X, but want to quickly jump to the command line, or just make an edit.