5/01/2016

Absolute path / Relative path

We have seen how the directories and files are organized in Linux in last post. Today we are going to learn how we refer a particular file or directory in 02 ways.



Absolute path
Always begines at / and ends at a single file specifying all directories and subdirectories between them.

for example, the absolute path for message file is
/var/log/messages

Relative path
A path related to your working directory.

for example, the relative path for message file for a user in var directory is
log/messages


Summary

Absolute path: starts from root
Relative path: starts from working directory 
tags: absolute path, relative path, linux, ubuntu, fedora, redhat, rhcsa, system admin, engineer, programing, cd, india


No comments:

Post a Comment