what is the difference between relative path and absolute
path?
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / suitable
relative path do not begin with /. its specifies location
relative to your current working directory and it can be
used as a shorter way to specify a file name.
absolute path always begin with a / (slash). It is a
complete "road map" file location.
Is This Answer Correct ? | 159 Yes | 35 No |
Answer / raveendra reddy
absolute path contains the exact path if anyone wants
to search for the particular file.this path contains all
the root folder information.so, by seeing the absolute path
anyone can easily determine a particular file in our system.
relative path also contains the root folder
information,but we can't determine any file with that
information.if anyone who are there in the root folder or
who knows the root folder only can be determine particular
file.
I think this information is enough to understand.bye
Is This Answer Correct ? | 30 Yes | 11 No |
Answer / sudipta
absolute means the path is absolutely present that means the required file's original path, from whenever u r present on ur system.
e.g.
i am finding for a file 'mypic.jpeg' which is present at d:/>my drive/picture & i'm present in the c:/>my document folder,then from that position the absoluute path is
'd:/>my drive/picture/mypic.jpeg'.
But in case of relative path,it indicate the path which is relative to that file(which one u want i.e 'mypic.jpeg') where it is present from that current location ,that may be the same folder,& it casually use when we hosted the file from server,locate the file with in the current folder & that is starting with '\' in windows os..
Is This Answer Correct ? | 8 Yes | 3 No |
Answer / masanam
I agree with below example:
Absolute path:
/home/user/My Picture/images/image123.gif
Obsolute path:
images/image123.gif
Is This Answer Correct ? | 22 Yes | 21 No |
Answer / ramakant
Absolute path contains parent folders and directory information.
Is This Answer Correct ? | 29 Yes | 30 No |
Answer / chandrahas
absolute path: it is complete address with domain name,directory name and file name.
ex: http://www.abc.com/images/img1.jpg
relative path: it is just directory name and file name.
ex: images/imag1.jpg
Is This Answer Correct ? | 9 Yes | 11 No |
What does this command do,"$more readme.txt“?
What is pipe command in unix?
Are you in or at the office?
What does this command do? Cat food 1 > kitty
how to remotely move a file ??? that mean how to move a file one machine to another machine ???
Explain how to use grep command to list find the records of a file containing 10 different strings?
Which RAID Levels supported by LVM?
Name the unix command to find how many days the server has been up.
Why is it called grep?
What is the difference between grep and grep?
Give two UNIX kernel parameters that effect an Oracle install
what is the functionality of kernel in unix architecture?