Technical data
Introducing the File System
6-6
Pathnames
A pathname locates a file or directory within a file system. For example, the path-
name /budget/fy1990/march/capital refers to a file or directory in the directory
march, which is in the directory fy1990, which is in the directory budget.
Root is the first directory created within a file system and all files and directories
originate from it. The file system has a tree structure as shown in Figure 6-2. Each
level below root can have many entries of files and directories; Figure 6-2 shows
only two files or directories at each level. You must cover the complete path be-
tween the directory you are at and the directory or file you wish to refer to or you
must refer to the target directory or file from the root directory. Each level between
“here” and “there” must be accounted for.
An absolute pathname is a path originating from the root directory; it answers the
question “how do I get there from root?”
A relative pathname is a path originating from your current working directory; it an-
swers the question “how do I get there from here?” Use a relative path when you are
describing a file that is in the subdirectory of your current working directory. Use an
absolute path when you are describing a file that is more easily described in terms of
the “root” directory.
A parent directory is the directory preceding the directory of interest; its name im-
mediately precedes the directory of interest in the pathname. For example, annual
is the parent of monthly; likewise, budget is the parent of annual in the following
pathname:
/budget/annual/monthly
Parent directories can also be referred to by “. .” . For example, if your current
working directory is monthly, “. .” is the same as annual. Current working directo-
ries can similarly be referred to as “ . ”. Figure 6-2 demonstrates the use of “. .” and
“ . ”, and relative and absolute pathnames.










