PathIn general usage, a path is a route between two points. It may also be used metaphorically, as a philosophical route to a desired state or destination.
In computing a path is the general form of a file or directory name. It intends to be a path to a specific file, where they may be many instances of that same file. Paths are a string of characters signifying directories, seperated by a delimiting character, most commonly the slash "/" or backslash character "\\", but some operating systems may use a different delimiter.
A path can be either absolute or relative. An absolute path is a path that points to the same location regardless of the working directory or combined paths. It is usually written in reference to a root directory, in the Microsoft Windows operating system this is the current working drive, however in Unix and Unix-like operating systems this is "/".
A relative path is a path relative to the current working directory, so the full absolute path may not need to be given.
Your current working directory is:
/users/mark/You want to change your current working directory to:
/users/mark/bobapplesAt that moment, the relative path for the directory you want is:
./bobapplesand the absolute path for the directory you want is
/users/mark/bobapplesBecause bobapples is the relative path for the directory you want, you may type the following at the CLI to change your current working directory to bobapples:
cd bobapplesTwo dots are used for moving up in the hierarchy, to indicate the parent directory, one dot represents the current directory.
See also: Hodology, the study of pathways.
This article is based on material from FOLDOC, used with permission. Update as needed.