While you can often access the files you need by browsing the filesystem in the Finder, sometimes you might need to specify the Unix path for a file or folder in question, either to run a Terminal command on it, or to communicate this path to others in an e-mail, online discussion, or otherwise.
There are many ways to get the path of a file in OS X, including the information window or if the file is open then right-clicking its title and seeing its path menu. However, these will not give you a full unix-compliant path to the file.
To do this, you simply need to use the Terminal, which can be used without entering a single command:
- Open the Terminal
- Drag a file or folder to the Terminal window
- Select and copy the auto-completed file path of the item in the Terminal window.
Additionally, if you know at least part of the name of a file you wish to access, then you can use Spotlight to locate it and likewise drag it from the Spotlight menu to the Terminal window.