X

Tip: Use OS X services to reveal or open file paths

There are several ways to open a typed file path in OS X so you can manage the resources contained within them.

Topher Kessler MacFixIt Editor
Topher, an avid Mac user for the past 15 years, has been a contributing author to MacFixIt since the spring of 2008. One of his passions is troubleshooting Mac problems and making the best use of Macs and Apple hardware at home and in the workplace.
Topher Kessler
3 min read

Apple's Spotlight offers a quick way to find user files and resources like applications or system preferences. However, it does not locate items in the system folder or in hidden folders, though at times you might need to access them. This limitation may be especially cumbersome to deal with if you are troubleshooting a problem in OS X or helping someone do so, meaning you may need to ask them to locate a specific hidden file and remove it or modify its contents.

For some system resources you can simply navigate through the Finder; however, in its default view the Finder does not show a number of hidden files and folders such as the user library. So, for example, if you tell someone to access his or her user library to locate the Fonts folder, since the user library is hidden he or she might instead erroneously access the global library at the root of the hard drive.

Reveal and Open contextual menu services
Right-clicking a selected text path will show an option in the Services menu to open or reveal the path in the Finder. Screenshot by Topher Kessler/CNET

Even if you are familiar with standard Unix file path notation and direct someone to open the ~/Library folder, if that person doesn't know what the tilde character means then he or she might go to the wrong directory in the Finder.

To get around these potential areas of confusion both for yourself and when instructing others, you can make use of some services and features in OS X that make possible quick access to any file or folder based on a typed path you provide, which can help avoid confusion and make it straightforward for anyone to open a specified Unix-compliant path.

The first option is to use the system's contextual services: if you have a full Unix-compliant path typed out, then you can simply highlight it, right-click the selected text, and then choose either Open or Reveal from the Services contextual menu, and the system will then display the item in the Finder or try to open it with its default handling application.

For example, you can triple-click the following folder path examples or otherwise select each in its entirety, and try opening the items in the Finder (note that if you use the Open service the system may ask for confirmation before opening the path):

Open and Reveal service warning in OS X
This warning may show up if you use the Open service. Screenshot by Topher Kessler/CNET

~/Library/Fonts

/System/Library/CoreServices

/var/db/dslocal/nodes

/Volumes

If you come across a file path as part of an instruction for tweaking your system or troubleshooting it, you can use these services to access it by selecting the file path and right-clicking in this way. Additionally, if you are attempting to help others access parts of their systems and you know the exact file or folder path they should use, then you can likewise send it to them and have them perform this procedure to quickly open it.

Open and Reveal services in OS X
These services can be enabled or disabled in the Keyboard system preferences. You can also assign them custom hot keys if desired. Screenshot by Topher Kessler/CNET

These contextual services are built into OS X and should be enabled by default, but if they aren't then they can be enabled in the Services section of the Keyboard system preferences, under the Keyboard Shortcuts tab.

While useful for opening a full file path from a text document or Web page, these options are also convenient in other areas. If you are a power user and access the Terminal regularly, then you probably have a number of file paths listed in your command history that you previously acted upon. If you need to open one of these paths in the Finder, you can use these services to quickly select and open it.

A last and related way to navigate through a full file path is to use the OS X Go to Folder feature that is available in the Finder's Go menu (and can also be invoked by pressing Shift-Command-G). With this option, you can copy a full file path or even a partial one with respect to the directory of the current Finder window, and then paste it in the Go to Folder field instead of using the Open or Reveal services, which should open it for you in the Finder. For example, select and copy any of the file paths listed above, and then paste it in the Go to Folder field to have the system open it in the Finder.



Questions? Comments? Have a fix? Post them below or e-mail us!
Be sure to check us out on Twitter and the CNET Mac forums.