Unix style
The following worked example discusses the behavior of a Unix-style file system as it would appear from a terminal or terminal application (command-line window):
Attached to a current working directory (cwd) of: /users/mark/
One wants to change the current working directory to:
/users/mark/bobapples
At that moment, the relative path for the desired directory can be represented as: ./bobapples
or for short: bobapples
and the absolute path for the directory as:
/users/mark/bobapples
Given bobapples as the relative path for the directory wanted, the following may be typed at the command prompt to change the current working directory to bobapples: cd bobapples
Two dots ("..") point upwards in the hierarchy, to indicate the parent directory; one dot (".") represents the current directory itself. Both can be components of a complex relative path (e.g., "../mark/./bobapples"), where "." alone or as the first component of such a relative path represents the working directory. (Using "./foo" to refer to a file "foo" in the current working directory can sometimes usefully distinguish it from a resource "foo" to be found in a default directory or by other means; for example, to view a specific version of a manual page instead of the one installed in the system.)
Bookmarks