Mac OS X – Quick way to get a long path into a terminal window
As noted in this post, there is no way to right-click a folder in the Finder and copy it’s full path to the clipboard. This is an annoying omission in OS X that can make life difficult for software developers and power users. But I just discovered a neat trick: you can simply drag the folder icon from the Finder into the Terminal window.
So for example, bring up a terminal window and type “cd ” (notice the space after “cd”). Then simply drag your folder from the Finder onto the terminal window, let go and you’ll be ready to hit the return key to change directory to that long path rather than having to type the whole thing out.