Filesystems


Mac OS X supports several types of filesystems. The most common is the default HFS+ (Hierarchical File System plus). Introduced under Mac OS 8.1 to support larger disks, HFS+ is an enhanced version of the original HFS filesystem. When it was introduced in OS 3.0 in 1986, HFS stood in contrast to the then-standard MFS (Macintosh File System). Some applications will not run correctly under filesystems other than HFS+.

OS X also supports traditional UNIX filesystems such as UFS (UNIX File System), which it inherited from Berkeley UNIX. HFS+ is different from traditional UNIX filesystems, but because UNIX offers a standardized filesystem interface, the differences are generally transparent to the user. The most significant difference lies in the handling of extended attributes (page 93).

Other supported filesystems include FAT16 and FAT32, which were originally used in MS-DOS and Windows. These filesystems are typically used for removable media, such as digital camera storage cards. ISO 9660 is used for CD-ROMs and the related UDF filesystem is often used for DVDs.

Nondisk Filesystems

Mac OS X supports filesystems that do not correspond to a physical volume such as a partition on a hard disk or a CD-ROM. A .dmg (disk image) file is one example (you can mount a disk image file so that you can access the files it holds by double-clicking it in the Finder). Another example is a virtual filesystem in which the filenames represent kernel functionality. For instance, the /Network virtual filesystem holds a directory tree representing the active local AppleTalk network. Although you can generally interact with a nondisk filesystem the same way you interact with any other filesystem, there may be some limitations. For example, you may not be able to write to a mounted .dmg file.

/Volumes

Each physical hard disk in a Mac OS X system is typically divided into one or more logical sections (partitions) that, when formatted, are called volumes. On a traditional UNIX system they are called filesystems.

Startup disk

Each OS X system has a volume, called the startup disk, that the system boots from. By default the startup disk is named Macintosh HD. When the system boots, Macintosh HD is mounted as the root directory (/).

The root directory always has a subdirectory named Volumes. For historical reasons, every volume other than the startup disk is mounted in the /Volumes directory. The pathname of a disk labeled Images is /Volumes/Images.

To simplify access, /Volumes holds a symbolic link (page 105) to the startup disk (the root directory). Assuming that the startup disk is named Macintosh HD, /Volumes/Macintosh HD is a symbolic link to /.

$ ls -ld '/Volumes/Macintosh HD' lrwxr-xr-x   1 root  admin  1 Jul 12 19:03 /Volumes/Macintosh HD -> / 


The /Volumes directory holds the same files as the Finder's top level so that the /Volumes directory serves as the effective root for the Finder and other applications. The Finder presents the pre-UNIX Mac OS view of the filesystem. The files in /Volumes are the same as the first components of Carbon pathnames (page 79). The system automatically mounts all volumes in /Volumes.




A Practical Guide to UNIX[r] for Mac OS[r] X Users
A Practical Guide to UNIX for Mac OS X Users
ISBN: 0131863339
EAN: 2147483647
Year: 2005
Pages: 234

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net