05.01.2013 Views

Mac OS X Leopard - ARCAism

Mac OS X Leopard - ARCAism

Mac OS X Leopard - ARCAism

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

292<br />

CHAPTER 18 INTRODUCING DARWIN AND THE SHELL<br />

The Darwin file system starts from root, which is symbolized by /. This is the highest level<br />

of the file system, and is essentially the same as viewing your primary hard drive in the Finder. A<br />

quick look in our root directory reveals the following items (the trailing / and @ symbols that follow<br />

have special meaning: / indicates that the item is a directory [or folder] and @ indicates that<br />

the item is a link [or alias]):<br />

Applications/ System/ etc@ sbin/<br />

Desktop DB Users/ home/ tmp@<br />

Desktop DF Volumes/ mach_kernel usr/<br />

Developer/ bin/ mach_kernel.ctfsys var@<br />

Library/ cores/ net/<br />

Network/ dev/ private/<br />

As you can see, all the basic Finder folders—Applications, Library, System, Users, and<br />

Developer (provided you’ve installed the Developer tools)—are there, along with a slew of other<br />

items. Some of these are merely system files that are of little interest to most people. Table 18-2<br />

shows some common directory paths and describes what sorts of files are located in them.<br />

Table 18-2. Common Darwin Directories and Their Contents<br />

Directory Path Contents<br />

/bin The /bin directory contains the core user executables that are necessary for<br />

the <strong>OS</strong> to function normally.<br />

/etc (/private/etc) The /etc directory contains the primary configuration files for much of <strong>OS</strong> X<br />

and its services.<br />

/sbin The /sbin directory contains the core administrative executables necessary<br />

for the <strong>OS</strong> to function normally.<br />

/tmp (/private/tmp) The /tmp directory is where the <strong>OS</strong> and many services and applications store<br />

data that is only used briefly and then discarded.<br />

/usr The /usr directory is a metadirectory that contains a number of<br />

subdirectories. Traditionally, these directories contain files that, while not<br />

necessary for the basic functioning of the system, are still often necessary for<br />

a system that functions the way one would expect it to. The truth is that<br />

these days, while the system would technically function without these files,<br />

most people would find it unusable. (Although it’s not exactly the same, the<br />

/usr directory is to Darwin what the /Library folder is to Quartz.)<br />

/usr/X11 (/usr/X11R6) X11 is UNIX’s traditional graphical interface. While it’s seldom used in <strong>Mac</strong><br />

<strong>OS</strong> X, some people may have uses for specific applications that rely on it.<br />

This is an optional install when you install <strong>Leopard</strong>, but if it is installed, this<br />

is where most of the parts of X11 live.<br />

/usr/bin Like /bin, /usr/bin contains user-level command-line executables. Many of<br />

the most common commands you will use are found in this directory.<br />

/usr/libexec This directory contains a number of special executables. This includes files<br />

that control tasks related to printing, networking, security, and the built-in<br />

web server.<br />

/usr/local This is yet another metadirectory. In the traditional UNIX way of doing things,<br />

this is where one would install any add-ons to the system that didn’t come<br />

with it by default. Many third-party additions will still install themselves here.<br />

This directory doesn’t exist by default in <strong>Leopard</strong>, but it’s likely if you make<br />

much use of Darwin, it will be created sooner or later.<br />

/usr/sbin Like /sbin, this is a directory that contains administrative executables.

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

Saved successfully!

Ooh no, something went wrong!