Wikia

Wikianswers

Welcome! Enter your question below. Please use words like "Who, What, Where, When, Why, How, etc..." in your question.
Nothing to ask? Help answer a question! Click here for a random, un-answered question.

What is the difference between an absolute pathname and a relative pathname?

Talk0
885,166questions on
Wikianswers

An absolute pathname is a pathname that starts from the root path and specifies all directories between the root path and the specified directory or file.

  • For example, here are some example root paths:
    • In DOS/Windows, the root path is typically a device letter such as C:\.
    • In Unix-based file systems, the root path is usually just / or some device volume locations such as /volume/hdd1.
    • On the Mac, the root path is usually a device name like My hard drive:, but since OS X is Unix-based it can also have that form of root path (usually only when operating from the command-line or running Unix-like apps).
  • Here are some example absolute pathnames:
    • In DOS/Windows: C:\Documents and Settings\user1\Local Settings\Application Data\Adobe\Acrobat
    • Unix: /users/user1/Library/Quicktime/
    • Mac: HD:Users:user1:Library:Quicktime:

A relative pathname is a pathname that specifies some abbreviations for traversing up the directory structure and down to another directory or file in the same directory tree. In most file systems (except Mac), the .. (two periods) abbreviation indicates "go up one directory level".

  • Here are some example relative pathnames:
    • In DOS/Windows: ..\Application Data\Adobe\Acrobat
    • Unix: ~user1/Library/Quicktime/, ~../user1/Library/Quicktime/
    • Mac: ::user1:Library:Quicktime:

Around Wikia's network

Random Wiki