[Next] [Previous] [Up] [Top] [Contents]

CHAPTER 2 Unix Structure

2.2 The File System


The Unix file system looks like an inverted tree structure. You start with the root directory, denoted by /, at the top and work down through sub-directories underneath it.

FIGURE 2.2 Unix File Structure

Each node is either a file or a directory of files, where the latter can contain other files and directories. You specify a file or directory by its path name, either the full, or absolute, path name or the one relative to a location. The full path name starts with the root, /, and follows the branches of the file system, each separated by /, until you reach the desired file, e.g.:

/home/condron/source/xntp

A relative path name specifies the path relative to another, usually the current working directory that you are at. Two special directory entries should be introduced now:

. the current directory

.. the parent of the current directory

So if I'm at /home/frank and wish to specify the path above in a relative fashion I could use:

../condron/source/xntp

This indicates that I should first go up one directory level, then come down through the condron directory, followed by the source directory and then to xntp.


Introduction to Unix - 14 AUG 1996
[Next] [Previous] [Up] [Top] [Contents]