[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]

System User's Guide: Operating System and Devices

File Systems

A file system is a hierarchical structure (file tree) of files and directories. This type of structure resembles an inverted tree with the roots at the top and the branches at the bottom. This file tree uses directories to organize data and programs into groups, allowing the management of many directories and files at one time.

Some tasks are performed more efficiently on a file system than on each directory within the file system. For example, you can back up, move, or secure an entire file system.

The basic type of file system is called the Journaled File System (JFS). This file system uses database journaling techniques to maintain its structural consistency. This prevents damage to the file system when the system is halted abnormally.

Some of the most important system management tasks have to do with file systems, specifically:

These tasks should be performed by your system administrator.

This section discusses:

File System Types

The operating system supports multiple file system types. These include:

Journaled File System (JFS) The basic file system type, it supports the entire set of file system commands.

Network File System (NFS) A file system type that permits files residing on remote machines to be accessed as though they reside on the local machine.

CD-ROM File System (CDRFS) A file system type that allows the contents of a CD-ROM to be accessed through the normal file system interfaces (open, read, and close).

File System Structure

On standalone machines, the following file systems reside on the associated devices by default:

/dev/hd1 /home
/dev/hd2 /usr
/dev/hd3 /tmp
/dev/hd4 /(root)
/dev/hd9var /var

The file tree has the following characteristics:

The following list provides information about the contents of some of the subdirectories of the /(root) file system.

/bin Symbolic link to the /usr/bin directory. In prior UNIX file systems, the /bin directory contained user commands that now reside in /usr/bin in the new file structure.
/dev Contains device nodes for special files for local devices. The /dev directory contains special files for tape drives, printers, disk partitions, and terminals.
/etc Contains configuration files that vary for each machine. Examples include:
  • /etc/hosts
  • /etc/passwd

    The /etc directory contains the files generally used in system administration. Most of the commands that used to reside in the /etc directory now reside in the /usr/sbin directory. However, for compatibility, it contains symbolic links to the new locations of some executable files. Examples include:

  • /etc/chown is a symbolic link to the /usr/bin/chown.
  • /etc/exportvg is a symbolic link to the /usr/sbin/exportvg.
/export Contains the directories and files on a server that are for remote clients.
/home Serves as a mount point for a file system containing user home directories. The /home file system contains per-user files and directories.

In a standalone machine, a separate local file system is mounted over the /home directory. In a network, a server might contain user files that should be accessible from several machines. In this case, the server's copy of the /home directory is remotely mounted onto a local /home file system.

/lib Symbolic link to the /usr/lib directory, which contains architecture-independent libraries with names in the form lib*.a.
/sbin Contains files needed to boot the machine and mount the /usr file system. Most of the commands used during booting come from the boot image's RAM disk file system; therefore, very few commands reside in the /sbin directory.
/tmp Serves as a mount point for a file system that contains system-generated temporary files.
/u Symbolic link to the /home directory.
/usr Serves as a mount point for a file system containing files that do not change and can be shared by machines (such as executables and ASCII documentation).

Standalone machines mount a separate local file system over the /usr directory. Diskless and disk-poor machines mount a directory from a remote server over the /usr file system.

/var Serves as a mount point for files that vary on each machine. The /var file system is configured as a file system since the files it contains tend to grow. For example, it is a symbolic link to the /usr/tmp directory, which contains temporary work files.

Showing Space Available on File System (df Command)

The df command displays information about total space and available space on a file system. The FileSystem parameter specifies the name of the device on which the file system resides, the directory on which the file system is mounted, or the relative path name of a file system. If you do not specify the FileSystem parameter, the df command displays information for all currently mounted file systems. If a file or directory is specified, then the df command displays information for the file system on which it resides.

Normally, the df command uses free counts contained in the superblock. Under certain exceptional conditions, these counts might be in error. For example, if a file system is being actively modified when the df command is running, the free count might not be accurate.

See the df command in the AIX 5L Version 5.1 Commands Reference for the exact syntax.

Note: On some remote file systems, such as Network File Systems (NFS), columns are blank if the server does not provide the information.

For example, to display information about all mounted file systems, type:


Press Enter.

If your system is configured so the /, /usr, /site, and /usr/venus directories reside in separate file systems, the output from the df command resembles the following:

Filesystem 512-blocks  free   %used   iused %iused   Mounted on
/dev/hd4    20480     13780    32%      805   13%     /
/dev/hd2   385024     15772    95%    27715   28%     /usr
/dev/hd9var 40960     38988     4%      115    1%     /var
/dev/hd3    20480     18972     7%       81    1%     /tmp
/dev/hd1     4096      3724     9%       44    4%     /home 

For example, to display available space on the file system in which your current directory resides, type:

df .

Press Enter.

Related Information

Commands Overview

Processes Overview

Chapter 4, Input and Output Redirection

Directory Overview

Chapter 6, Files

Linking Files and Directories

Chapter 8, Backup Files and Storage Media

Chapter 9, File and System Security

[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]