Sorry, you need to enable JavaScript to visit this website.

Digital Unix Paths

Paths are essential for navigating through a Digital UNIX file system. They help you locate information in your account and through the entire computer system. In addition, paths let you tell commands to operate on files besides those in your current working directory.

Digital UNIX paths also apply to the Internet and the World Wide Web (WWW).Universal Resource Locators (URLs), are like addresses to information on the Internet-and they are based on UNIX-style pathnames. URLs specify a scheme(type of connection), hostname, and pathname in order to locate documents.

Example: If you have a personal home page, its URL is in the same form as:

In the above example, "http://" is the scheme, "" is the hostname, and "~abc1234" is the pathname that automatically points to the "www" directory under the home directory of your Digital UNIX account.

What are Digital UNIX paths?

A UNIX computer system is called a host because it can allow many users to share its resources. A particular computer system is known by its hostname; "Grace" is the hostname of ITS' multi-user Digital UNIX system.

Digital UNIX organizes information into files and directories. Files are individual documents. Directories are special files that act as containers; they can store files as well as other directories. The file system organizes the relationships between files and directories, much as a filing cabinet organizes papers and folders. Your account is part of that file system, as are several other important areas:

Directory name Description Notes
Root Directory Top-Level directory of the entire Digital UNIX System Indicated with a slash (/) alone or before the rest of a pathname
Home directory Top-level directory of your own Digital UNIX account Named the same as your account's username, such as "abc1234"
Current working directory Directory you are current "in," no matter where you are in the files system Unless you tell it otherwise, a command will only affect your current working directory
World Wide Web Directory Directory for storing your personal home page (see Start:Personal Home Page) Created with the ofw command; named "www" inside your home directory
Temporary directory Directory where you can store extra files for a brief period of time /var/tmp /usr/tmp
User Commands directory Directory for UNIX commands /usr/local/bin

The location of each file and directory is its path. A pathname is a full description of where a file or directory is stored in the file system. Consider a forest full of trees, where each tree is similar to a UNIX host. If a hostname lets you pick out a particular tree, then a path points to a specific leaf on that tree. The pathname includes each branch you would take, from the ground (or "root") up, to reach the leaf.


In the above figure, the file system of a Digital UNIX host can be visualized as a directory tree. In this case, the root (/) of the tree is the top level, and the braches containing files and directories are below it.

parent directory is one level above another in the directory tree. A subdirectory, or child directory, is one step below on the directory tree. Therefore, in Figure 1 above, the parent directory of "/usr" is the root directory. The temporary directory, "/usr/tmp," is a subdirectory of "/usr."

An absolute pathname to a file or directory is a reference to its location relative to the system's root directory. Each directory level should be separated by the slash character (/). A relative pathname compares a file or directory's location to the location of your current working directory. Within a relative pathname, you can go to a parent directory, by using two periods (..). To go to a subdirectory, type its name in the pathname. Therefore in Figure 1, all of the paths listed are absolute pathnames. Any pathname with a slash at the beginning is absolute because it starts at the root directory. For instance, the absolute pathname to the user commands directory shown is "/usr/local/bin."

How do I get help with Digital UNIX paths?

How do I use Digital UNIX paths?

Point to files and directories on a UNIX host computer
Digital UNIX paths are often used in commands that affect files (see Start: Digital UNIX concepts and Start: Digital UNIX file management). While you are logged in to a Digital UNIX host (such as "Grace"), you can find your current working directory by entering the pwd ("print working directory") command at the command prompt (see Digital UNIX file management).
Select destinations on the Internet
In addition, you can use UNIX-style paths in Internet client programs for personal computers or when creating your personal home page (see Personal Home Page).