Mac OS X Internals: A Systems Approach
2.5. A User-Space View of the File System
The Mac OS X user space is where end users and most developers spend their computing time. The file systemor rather, its content and layoutis fundamental to how users interact with the system. The Mac OS X file system's layout is largely a superimposition of Unix-derived and NEXTSTEP-derived file systems, with many traditional Macintosh influences. 2.5.1. File System Domains
The Unix-style file system view in Mac OS X can be used to access all files and directories on a volume, including the Mac OS Xspecific portions of the file system. Some Unix-specific aspects of this view include standard directories such as /bin/, /dev/, /etc/, /sbin/, /tmp/, /usr/, /usr/X11R6/,[18] /usr/include/, /usr/lib/, /usr/libexec/, /usr/sbin, /usr/share/, and /var/. [18] Some components, such as the X Window System, are optional. If they are not installed, certain directories may not be present. Mac OS X conceptually divides the file system into four domains: User, Local, Network, and System. 2.5.1.1. The User Domain
The User domain contains user-specific resources. In Unix terminology, this is a user's home directory. For a user named amit, the default local home directory location is /Users/amit/, and the default network home directory location is /Network/Users/amit/. A user's home directory contains several standard directories, such as .trash, Applications, Desktop, Documents, Library, Movies, Music, Pictures, Public, and Sites. Certain per-user directories such as Public and Sites are meant to be publicly accessible and therefore have read permissions for other users. 2.5.1.2. The Local Domain
The Local domain contains resources available to all users on a single system. It includes shared applications and documents. It is usually located on the boot volume, which, typically, is also the root volume. The /Applications/ directory lies in the Local domain. Unlike the User domain, which can be arbitrarily manipulated by its owning user, only a user with system administrator privileges may modify the Local domain. 2.5.1.3. The Network Domain
The Network domain contains resources available to all users on a local area networkfor example, applications and documents that are shared over a network. The Network domain is usually located on a file server and is locally mounted on a client machine under /Network/. Only a user with network administrator privileges may modify this domain. Specific directories within this domain include Applications, Library, Servers, and Users. 2.5.1.4. The System Domain
The System domain contains resources belonging to Mac OS X. Its contents include the operating system, libraries, programs, scripts, and configuration files. Like the Local domain, the System domain resides on a boot/root volume. Its standard location is the /System/ directory. The system searches for resources such as fonts and plug-ins in various domains in the order of the most specific domain first and the most general domain last, that is, User, Local, Network, and System. 2.5.2. The /System/Library/ Directory
Each file system domain contains several standard directories, some of which may exist in multiple (or all) domains. Perhaps the most interesting directory in any domainand one that exists in all domainsis Library. It contains a hierarchy of several standard subdirectories. In particular, a substantial part of the operating system resides in /System/Library/. Let us look at examples of its contents.
The /System/Library/CoreServices/ directory contains several system components used in the system's normal operation, such as the Dock and Finder applications. Other examples include those listed here.
Figure 22. Sequence of GDB commands for generating a crash report
|
Категории