TITLE
    Mac OS X Server: Directory Structure and File Types
Article ID:
Created:
Modified:
60054
3/2/99
6/5/00

TOPIC

    This article describes Mac OS X Server's directory structure and file types.


DISCUSSION

    The top (or "root") level of your hard drive is called "/" ("slash" or "root"). The Mac OS equivalent is Macintosh HD. Folders are called "directories." Directories located at the root level are referred to as /<directory name>.

    There are three default directories (folders) at the root level of the hard drive. /Local, /System, and /Network.

    /Local is for files specific to the computer that you're on.

    /Local/Applications/Internet/ - Contains OmniWeb.app, the web browser. Required for reading some help files.
    /Local/Library/Receipts - Contains .pkg files - Essentially installer logs for what's installed on your computer.
    /Local/Library/WebServer - Default location for your web files. Can be changed in the Setup Assistant.
    /Local/Library/MacOS/Users/ - Location for each user's startup disk and PRAM setting.
    /Local/Users - Home directories for each user.

    /System is for files specific to the operation of the computer

    /System/Administration - The applications needed for administering the computer.
    /System/Applications - These are programs and utilities that come with the computer.
    /System/Documentation - Contains Read Me files, System Help.

    /Network is for remote resources (devices, volumes, and users).

    In general, applications folders contain applications.

    /System/Applications contains applications that come with the computer /Local/Applications is a good place for administrators to install third-party applications that they want to make available to all users.

    /Network/Applications is a good place for the Administrator to install applications for other NetInfo users to use on a NetInfo Network. (Used by the system, stored on the local drive or store a server). Note : If you move an application from its default directory, it may no longer work correctly.

    Documentation folders contain help system files (.help) and other instructional documentation.

    Users folders contain the users' "home" folders, where users keep their files.
    The "home" folder for a user is also represented as "~username". If a user name is omitted, it is taken to mean the current user.

    Filenames

    Filenames are case-sensitive. myfile and Myfile, are different files.

    The part of a filename after the last period is called the "extension." Extensions can be of any length and usually indicate a file's type. Some common extensions are .app (application), .rtf (rich text format), and .mbox (mailbox). If a file has multiple extensions, separated by periods, the last extension is the one the system uses to determine the file's type. Renaming a file to change its extension does not change its file type.

    Also note that XXX.app is really an application wrapper. This is essentially a folder that contains what we think of as resources (other languages, picture and text files). To view its contents, open the Contents inspector and click on the "Open Application Wrapper..." button or use the keyboard shortcut (Command-Shift-O)

    Pathnames

    If you are typing a file path, you can save time by using some shortcut notation for the relative path.

    ./ refers to the current directory.

    ./Stuff/thing.html would be a file called thing.html in a directory called "Stuff", located in the current directory.

    ../ refers to the parent directory. You can have a ../ for each directory away from the root directory that your current directory is.

    This information may come in handy when trying to decipher file locations or when entering commands in Terminal.app or in the Workspace Manager "Go To" command under the Tools menu.

    Expert Mode/Invisible files

    Since Mac OS X Server is based on a Mach/BSD core, there are traditional Mach/BSD directories. However, these directories are hidden by default, in every account but the Administrator account. To view these files, you can choose "Expert" from the Preferences.app in /System/Applications (or under User Preferences in the Apple Menu). Expert mode can be triggered by changing to a directory that is only visible in Expert mode. To toggle back, update the viewer (command - U).

    Note : Most tasks can be performed without having to use Expert Mode.

    These additional items appear in Expert mode:

    /bin - binaries, usually user-invoked commands
    /cores - (core dump saved here after bad crash)
    /dev - device driver interfaces. This is a link to /private/dev
    /etc - directory where most configuration info is stored. This is a link to /private/etc
    /lib - shared libraries
    mach - a link (alias) to mach_kernel
    mach_kernel - the kernel, the single most important file. This is the boot file listed in Open Firmware
    /Net - a link to /Network/Servers
    /private - contains /etc, /dev, /tmp, /var and more
    /sbin - system-related binaries
    /tmp - erased at restart. This is a link to /private/tmp
    /usr - items related to applications and devices
    /var - variables, spool and growable files and logs. This is a link to /private/var
    .hidden - contains a list of files to be invisible in non-expert mode
    .vol -

    Files beginning with a dot are invisible.

Document Information
Product Area: Mac OS System Software
Category: Mac OS X Server
Sub Category: General Topics

Copyright © 2000 Apple Computer, Inc. All rights reserved.