Tutorial: Mac OS X Location Finder: Part 1

A guide to where important files are stored in Mac OS X.

[Published Thursday, June 7th]

Ted Landau
June 2007

One of the most common questions people ask when working with their Mac is: "Where is it?" Not where is the Mac itself (hopefully that is not a mystery!), but where is some apparently hidden file on the Mac. As in: "I want to make a backup of my Safari bookmarks file. Where is the file?" Or: "I am looking at the list of 'Preferred networks' in the AirPort section of the Network System Preferences pane. Where exactly is this list stored?"

To help answer these sorts of queries, I have put together a Location Finder, in a Q & A format, mapping out some of Mac OS X's most frequently sought-after but not especially obvious destinations. These are items that you could not easily find using a tool such as Spotlight (either because Spotlight does not search the relevant locations or it wouldn't be clear what the proper search terms should be).

Q. Two applications that are ever-present in Mac OS X are the Finder and the Dock. Yet, when I search the Applications folder, they are nowhere to be found. Where are these applications located?

A. You'll find these two applications, together with a host of other interesting files, in the /System/Library/CoreServices folder. Items in this folder are considered critical, if not essential, for the normal running of Mac OS X. The Finder and the Dock certainly qualify in that regard.

Q. You said CoreServices contains "a host of other interesting files"? Like what?

A. Here are a just a few examples:

From the Network System Preferences pane, if you click the "Assist me..." button, a dialog appears that contains "Diagnostics..." and "Assistant..." buttons. Clicking the former button launches Network Diagnostics; clicking the latter button launches Network Setup Assistant. Both of these applications are located in the CoreServices folder.

Also in CoreServices is the Software Update application that launches after you select the relevant command from the Apple menu.

Speaking of the Apple menu, if you select the About This Mac command, a window appears that lists what version of Mac OS X you are running. Ever wonder where the Mac stores this bit of knowledge? It's in a file called SystemVersion.plist, yet another item found in the CoreServices folder. [For more information on .plist files, see my previous tutorial series.]

Also check out CoreServices' Menu Extras folder. Inside it are most of the menu items that can be optionally installed in Mac OS X, such as the AirPort menu, the Battery menu and the Eject menu. As an alternative to the typical way of installing these menus (e.g., via checkboxes in System Preferences panes), double-clicking any item in this folder will immediately add it to your menu bar.

Caution: I generally recommend a "look but do not touch" policy when dealing with files in CoreServices. Relocating or modifying these items can have very serious consequences, including a crash of your Mac with an inability to restart successfully.

Figure 1. The CoreServices folder. Among other items of interest, notice the Dock, Finder and Menu Extras folder.

Q. I found the System Preferences application in the Applications folder. But I couldn't find any of the actual Preferences panes. Where are they stored?

A. The ones that are included by default as part of Mac OS X are found in /System/Library/PreferencePanes. If you install third-party panes, you'll find them either in /Library/PreferencePanes (if they were installed so as to be available to all users with accounts on your Mac) or in the same-named folder insider the Library folder of your Home directory (in which case the pane is only available to your account).

Double-clicking one these .prefPane files will launch it directly.

Figure 2. PreferencesPane folder in /System/Library.

Q. When I check the list of Login Items for my account in the Accounts System Preferences pane, I see an item called iTunes Helper? What is it and where is it?

A. This unusual item is used to assist iTunes in interacting with iPods. It's located inside the iTunes application package.

A bit of background about "packages": Most Mac OS X applications, as they are seen in the Finder, are really folders in disguise. These special folders are called packages. To look inside these application packages, click the application icon and select its Show Package Contents contextual menu command. If you do that for iTunes, and navigate down to the Contents/Resources folder, you'll find the iTunes Helper application.

By the way, you can easily find the location of any item in your Login Items list simply by letting the Mac cursor hover over the item's name until a yellow tool tip box appears. The tool tip text lists the location of the item. [The Login Items list itself is stored in the loginwindow.plist file located in the Library/Preferences folder of your home directory.]

Figure 3. iTunes Helper inside of iTunes application.

Figure 4. A Login Items list with the tooltip for iTunesHelper visible.

Q. In the Help menus of iWork 06's Pages and Keynote, there is an option to open the User Guide for each application. Each guide opens as a PDF document in Preview. Where are these guides located?

A. They are located in the main Library folder found at the root level of your drive. More specifically, navigate down to /Library/Documentation/Applications/iWork '06. Here you will find two files called Keynote User Guide and Pages User Guide. Oddly, even though they have the icon of a Preview PDF document, these two files are actually more like applications! The true PDF document User Guide is located inside the package. To find it, use the Show Package Contents command and drill down through Contents/Resources/English.lproj. Whew!

You can confirm the location of these guides by command-clicking on the name of the file in the title-bar of its document window in Preview. As with almost any document, this reveals the full path to its location.

By the way, the Documentation folder also includes manuals and help files for various other software. For example, the /Library/Documentation/Help folder contains items such as AirPort.help and MacHelp.help. These items, which are also actually packages, are normally accessed via the relevant software's Help menu. If you double-click one of these .help items, they open directly via the Help Viewer application (which itself is located in CoreServices).

Q. To solve a problem I was having with some program, a friend told me to reinstall the application software. My friend said this would replace a needed kernel extension that had somehow gone AWOL. It worked! But I am curious: where exactly are these extension files stored?

A. These extensions (which have .kext suffixes in their names) are mainly files that assist Mac OS X in interacting with Mac hardware components and peripherals. You'll find these items in the /System/Library/Extensions folder. Most are installed by default as part of Mac OS X. A few third-party programs add their own extensions. If, perhaps after doing an Archive & Install, a third-party extension gets dropped from the Extensions folder, you'll need to reinstall the extension, just as your friend suggested.

SnapzPro X is one program with a potential problem here. It installs an extension named AmbrosiaAudioSupport.kext. If it goes missing (which has happened to me twice now!), you won't be able to enable the audio track option for taking movies with SnapzPro. Reinstalling SnapzPro X fixes the glitch.

Q. I occasionally log in as the root user. Where is the root user's home directory located?

Many Mac users are aware of the ability to log in a the "root user." Briefly, you do this by entering the word "root" as your username in the Login Window (clicking the Other... option first if needed). For the password, give the one you presumably previously designated via the Security menu commands in the NetInfo Manager application. As the root user, you are virtually free of any of the ownership restrictions present when logged in to other accounts. Temporarily logging in as root can thus be useful on occasions where a permissions problem otherwise prevents you from carrying out a desired action.

But where exactly is the home directory for this account? Is it in the /Users folder where all other user accounts are located? Nope. Instead, you'll find it in the invisible Unix folder named var. To go there, type Command-Shift-G in the Finder. From the Go To Folder dialog that appears, type: /var. Now look for a folder named root. That's the root user's home directory. You will be barred from entering this folder while logged into your own account. But if you log in as the root user, you will find that this is where you wind up.

As long as we're in the var folder, take a moment and check out another item of interest: the vm folder. Inside you will find the swapfiles that Mac OS X uses to store the contents of virtual memory. If you have a laptop Mac that supports Safe Sleep, you'll likely also find a sleepimage file. This file is where Mac OS X stores the contents of the Mac's RAM at the point that the Mac enters Safe Sleep.

Figure 5. The root and vm folders, located in the var folder.

Q. At the start of this article, you mentioned backing up Safari's bookmarks file. So where I can find this file?

It's in the Safari folder insider the Library folder of your home directory. Look for a file named Bookmarks.plist. As with all .plist files, you can view its contents via Apple's Property List Editor (or other similar third-party utilities, such as PlistEdit Pro). A file called History.plist, located in the same folder, stores the items tracked in Safari's History listing.

Q. At the start of this article, you cited AirPort's Preferred network list. Where is this list stored?

It's in yet another .plist file. This time start in the main Library folder (not the one in your home directory) and go to Preferences/SystemConfiguration. Here you'll find a file named com.apple.airport.preferences.plist. Open it up in Property List Editor and navigate to the property named "List of known networks." Click the disclosure triangle to the left of the name to reveal the list. Click the triangle next to each numbered listing to get further details.

Figure 6. The "List of known networks" in com.apple.airport.preferences.plist (as viewed in Property List Editor). Three networks are listed (0, 1 and 2). The 0 network is shown to be "JumpJet X."

This is far from a complete list of unusual locations of interest in Mac OS X. That's why I plan to have another installment of this Location Finder within the next few months. If there's a location you'd like to see included, drop me a line and let me know.

To send comments regarding this column directly to Ted, click here. To get Ted's latest book, Mac OS X Help Line, click here.

Resources
  • More from Tutorials
  •  

    Join the discussion

    Conversation powered by Livefyre

    Don't Miss
    Hot Products
    Trending on CNET

    HOT ON CNET

    iPhone running slow?

    Here are some quick fixes for some of the most common problem in iOS 7.