UNIX / Linux: Absolute Pathnames

by on July 1, 2007 · 2 comments· LAST UPDATED August 15, 2007

in , ,

Q. Can you explain the term absolute pathname under UNIX or Linux oses?

A. An absolute pathname, is the location of a filesystem object relative to the root directory. All absolute pathnames always begin with a slash (/). With Absolute pathname you have access to complete file system objects such as directories and files.

Absolute Pathnames

You can use absolute pathnames to specify full file path such as /etc/passwd. It is believed that UNIX pathname looks and feels like Internet addresses, thus result into compatibility. The absolute pathname of the current directory can be found by using the pwd command:
pwd

Absolute Pathnames Examples

Try following commands:
pwd
ls /etc
ls /usr/share/games
cd /usr/share/games
pwd
cd ~
pwd
cat /etc/passwd
cp /etc/passwd /tmp
cd /tmp
pwd
cat passwd

TwitterFacebookGoogle+PDF versionFound an error/typo on this page? Help us!

{ 2 comments… read them below or add one }

1 Rishik Bharti August 25, 2012 at 12:48 pm

nice ..i got satisfied answer,, thanks to all of you.

Reply

2 Sandeep Gulia May 5, 2013 at 6:06 pm

Good explanation..with Examples
Regards,
Sandeep Gulia

Reply

Leave a Comment

Tagged as: , , , , ,

Previous Faq:

Next Faq: