Now that OS X El Capitan (OS X 10.11) has been out for a little while, I have managed to stumble across some of those cheeky hidden features (AKA Easter Eggs) that Apple love to slip into an OS update. Here’s a rather useful techy one.
For a while now in OS X, there have been plenty of ways to find out WHERE on your computer a file or folder is stored. But being able to easily grab the pathname to an item to document this location or perhaps even enter this pathname into apps such as Terminal to execute a command on a given path has not always been so easy.
Some of the existing options for finding out WHERE an item are stored are worth reviewing first before I announce the new hidden pathname feature. I find that many Mac users are not aware of the very simple ways to find out the location of an item.
Option 1 – to discover the location of a file:
Whilst working on a document, COMMAND-CLICK the NAME of the document in the document window. Below is an example whilst working in a text file within the TextEdit app, but this works in almost all apps in OS X. (Works with Word, Excel, PowerPoint, Pages, Numbers, Keynote etc):
As you can see, my ‘RussDoc’ file is located at the following path: /Users/ladmin/Documents/Amsys/Training/El Capitan/New Features/Blog info/
I now know WHERE my file is, and I can even traverse back through this path by selecting any of the parents folders within this pathname.
This feature also works in the Finder:
Option 2 – to discover the location of a file or folder:
COMMAND-CLICK the NAME of the document/folder in the Finder window:
Now, onto retrieving the pathname itself, instead of having to type it all out manually once you have discovered the file/folder location.
Pre-OS X El Capitan option to discover the pathname of a file or folder:
1) CONTROL/RIGHT-CLICK the document/folder in the Finder and select Get Info:
2) From the Get Info window copy the pathname from the ‘Where’ entry under the ‘General’ information:
Now this will give you the pathname of the parent FOLDER that your item is in. You just need to add the name of the item itself to the end of this pathname to have the full pathname.
NEW OS X El Capitan option to discover the pathname of a file or folder:
1) CONTROL/RIGHT-CLICK the document/folder in the Finder and hover your mouse icon over the ‘Copy’ option. (Do NOT click the mouse button to select this option yet):
2) Whilst still hovering your mouse over the ‘Copy’ contextual menu option, hold down the ALT/OPTION key. The ‘Copy’ option changes to ‘Copy as Pathname’. This copies the full path to the file into the OS X clipboard. You can then paste this full pathname anywhere you like. Perhaps in Terminal or into a text document:
Here is the ‘Pasted’ result when selecting to paste the clipboard copied entry into Terminal:
Notice that this isn’t the pathname to the folder the item is in, but the FULL pathname INCLUDING the filename itself.
Yes, in Terminal you can just drag the item from the Finder onto the Terminal window to add the pathname, but this is a Terminal feature and not supported in other apps. This new Contextual menu feature will allow you to paste the full pathname into any app that supports copy and pasting text.
If you are using a shared cloud-based storage solution, (iCloud, Dropbox, OneDrive, Google Drive etc), this is a great way to then email someone the exact location of a document stored in your shared storage folder so they know where to find the document.
I hope you also find this new El Capitan feature useful.
If you would like to learn more about OS X, then take a look at our collection of training courses.
Since OS X El Capitan is currently still a recent release, if you support OS X clients, why not attend our 1/2 day Supporting OS X El Capitan seminar to discover other new features and also support and troubleshooting tips.
While the author has taken care to provide our readers with accurate information, please use your discretion before acting upon information based on the blog post. Amsys will not compensate you in any way whatsoever if you ever happen to suffer a loss/inconvenience/damage because of/while making use of information in this blog.
These features were tested using OS X El Capitan v10.11.0 which was the latest Mac OS release at the time of writing.