You are here
Home > Redhat > What is Relative & Absolute Path

What is Relative & Absolute Path

 

What is Relative & Absolute Path

Relative Path

By using [ “.” And “ ..” ]

Absolute Path

By using Full Path

Specify a file or directory by its path name, either the full, or absolute, path name or the one relative to a location. The full path name starts with the root, /, and follows the branches of the file system, each separated by /, until you reach the desired file, e.g.:

/home/smarte/source/data

A relative path name specifies the path relative to another, usually the current working directory that you are at. Two special directory entries should be introduced now:

So if I'm at /home/smarte/source and wish to specify the path above in a relative fashion I could use:

../backup/unix/document

“ . “ It refers current directory

“ . .” It refers parent directory

 

Leave a Reply

three × five =

Top