what is the difference between relative path and absolute
path?

Answer Posted / raghavendra utsai

A relative path describes the location of a file in
relation to another file on the same current Directory .
The starting point is the location of the document with the
path. The path may appear as:

images/image123.gif

Looking at this path you can tell that the document with
this path is inside of a Current folder which also has a
subfolder named images. And, inside of the images
subfolder, there is a file named image123.gif.

We can Say like, "Stay inside the folder you are already
in and find a subfolder named images. Now look inside of
that subfolder and find a file named image1.gif."

Also known as the full path, the absolute path is a path
that contains the root directory and all other sub
directories required to get into the directory you're
currently in or wish to get to. Below is a basic example of
a generic path and an absolute path.

Absolute path:

/home/user/My Picture/images/image123.gif

As can be seen from the above example, the absolute path
contains the full path instead of a few directories
contained within the absolute path. Below are some
additional examples.

Example 2
Absolute path:
C:\My Picture\images\image123.gif

Is This Answer Correct ?    182 Yes 15 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Which command is used to kill the last background job?

1006


What is “chmod” command?

747


what is the advaantage of each user having its own copy of the shell?

2291


What is the use of the tee command?

806


How do I run a whois command?

815


What is grep and how do you use it?

782


What do know about tee command and its usage?

845


hw will u use awk in replacing cahrs and files

2931


What is the use of cut command in unix?

946


What are the differences among a system call, a library function, and a unix command?

795


What does touch command do in unix?

973


Why is grep called grep?

984


What is the significance of the 'tee' command?

820


What is merge command in unix?

1135


Write a command to kill the last background job?

789