Next / Previous / Index / ITC Help System / Publications / Site map / NM Tech homepage

What is an absolute pathname?

Tech Computer Center logo

If a file is located in the root directory, its absolute pathname is formed by prefixing a slash character (/) to the name of the file. For example, a file named klarn in the root directory can be referred to as "/klarn".

Suppose the root directory contains a subdirectory named bar which in turn contains a file named baz. You could refer to this file as "/bar/baz".

To form the absolute pathname of a file f:

  1. Start with a slash (/) to symbolize the root directory.
  2. For each directory between the root directory and f, append the name of the directory and another slash.
  3. Finally, append the name of the file.

For example, pathname /red/joe/recipes/mousaka refers to a file named mousaka, located in a directory recipes, which is a subdirectory of directory joe, which in turn is a subdirectory of directory red, which is located in the root directory.

Next: What is a relative pathname?
See also: What is a pathname?
Site map
Index: Keyword index to help pages
Help: New Mexico Tech Information Technology and Communications: Help System
ITC Publications
To report a problem: File a ticket
Send mail to the User consultant on duty or call them at 575-835-5437
Home: About New Mexico Tech

John Shipman,
Last updated: 1995/12/04 19:39:34 UT
QR two-dimensional bar code