05.01.2013 Views

Mac OS X Leopard - ARCAism

Mac OS X Leopard - ARCAism

Mac OS X Leopard - ARCAism

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

36<br />

CHAPTER 2 THE FILE SYSTEM<br />

Hidden Folders<br />

The folders mentioned previously barely scratch the surface of the whole file system on <strong>Leopard</strong>.<br />

The thing is, most of the other folders and contents are hidden from the Finder. These hidden<br />

files are mostly part of the UNIX system on which <strong>Leopard</strong> runs (largely referred to as the Darwin<br />

subsystem of <strong>OS</strong> X). Later, in Chapters 18 and 19, we’ll devote a large part of our discussion<br />

to Darwin and the UNIX underbelly of <strong>Leopard</strong>.<br />

If you are curious as to these hidden files, the following AppleScript can toggle the visibility<br />

of hidden Finder items:<br />

tell application "Finder" to quit<br />

try<br />

do shell script "defaults read com.apple.finder AppleShowAllFiles"<br />

set OnOff to result<br />

on error<br />

set OnOff to "0"<br />

end try<br />

if OnOff = "0" then<br />

set OnOffCommand to "defaults write com.apple.finder AppleShowAllFiles 1"<br />

else<br />

set OnOffCommand to "defaults write com.apple.finder AppleShowAllFiles 0"<br />

end if<br />

do shell script OnOffCommand<br />

delay 1<br />

tell application "Finder" to launch<br />

To run this script, open the Script Editor (found in /Applications/AppleScript/), type the<br />

preceding script into the editor, and then click the Run button. Then have a look in the Finder<br />

and relish all the other folders and items that appear. Run the script once more to hide these<br />

items again. Feel free to create a Scripts folder in your ~/Library/ folder and save this little file<br />

there as “Toggle Hidden” or some such name, so that it will be available to you later.<br />

Summary<br />

NOTE Most hidden files are there for a purpose, and are likewise hidden for a purpose. Usually<br />

this purpose is to protect the files from accidental disturbance by casual users. It’s<br />

generally best to leave hidden files alone, at least until you learn what they do and how to<br />

work with them properly (some of which will be covered in this book).<br />

Now that you’ve had a glimpse of how everything is organized on your computer and learned<br />

how to move around it, we’re going to take a brief side track in the next chapter to point out a<br />

few of the unique features in <strong>Mac</strong> <strong>OS</strong> X, including some new features introduced in <strong>Leopard</strong>,<br />

such as Spotlight, Dashboard, Spaces, and Expose.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!