Hidden Files

By default, the Finder hides many files and folders from view, including the entirety of Darwin’s directory layout, under the philosophy that most Mac OS X users will never need to access the system’s Unix underpinnings. Savvier users, on the other hand, have a number of ways to see and work with all the filesystem’s files.

Seeing Hidden Files

There are two ways to see files that don’t appear in the Finder. The most direct way involves simply viewing a folder’s contents by running the ls command on it in the Terminal. The Terminal sees the world simply as a tree of directories and files, and nothing more; files that have special, Mac-specific system roles appear like any other file. (However, you’ll have to run ls with the -a flag.)

The other way involves changing the Finder preference that keeps these files hidden from sight. (Apple gets points for making this a user-adjustable preference, albeit not a very obvious one.) You’ll need to add a value to the Finder preferences’ file. You can accomplish this by operating the defaults command-line program on your com.apple.finder user defaults domain (described in Chapter 25), or by directly editing your /Users/ username /Library/Preferences/com.apple.finder.plist file with the Property List Editor application, as shown in Figure 7-2.

The Finder’s preferences, as seen in Property List Editor

Figure 7-2. The Finder’s preferences, as seen in Property List Editor

To add a value to the ...

Get Mac OS X Panther in a Nutshell, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.