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 13), or by directly editing your /Users/
username
/Library/Preferences/com.apple.finder.plist file with the Property List Editor application, as shown in Figure 9-2.
To add a value to the com.apple.finder.plist file, follow these steps:
Launch the Property List Editor (/Developer/Applications/Utilities).
Open the com.apple.finder.plist file located in /Users/
username
/Library/Preferences.Click on the disclosure triangle next to Root to reveal the values and keys for the Finder’s preferences.
Select Root by clicking on it once. ...
Get Mac OS X Tiger in a Nutshell 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.