- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Absolute path & Relative Path
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-12-2006 03:03 AM
тАО08-12-2006 03:03 AM
Absolute path & Relative Path
I want to know what is the difference between Relative Path and Absolute Path.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-12-2006 03:08 AM
тАО08-12-2006 03:08 AM
Re: Absolute path & Relative Path
the absolute path begins always with "/" - the relative path is (like the name suggests) relative - in every respect, depending on your current working directory.
Hope this helps!
Regards
Torsten.
__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.
__________________________________________________
No support by private messages. Please ask the forum!
If you feel this was helpful please click the KUDOS! thumb below!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-12-2006 03:47 AM
тАО08-12-2006 03:47 AM
Re: Absolute path & Relative Path
Let's say that you are in a directory called /abc/def and in that directory are other directories ghi and jkl.
Now if you wanted to back up ghi and jkl with tar using Absolute path you would do:
# cd /abc/def
# tar -cvf ghi_jkl.tar /abc/def/ghi /abc/def/jkl
Absolute path means specifying the ENTIRE path to the directory you want to back up. When you restore this it will be restored to the SAME EXACT path (/abc/def/ghi).
Now, if you want to back up ghi and jkl with relative paths, you would do:
# cd /abc/def
# tar -cvf ghi_jkl2.tar ghi jkl
or
# tar -cvf ghi_jkl3.tar ./ghi ./jkl
Both of the above commands accomplish the same thing. The 2nd command (with ghi_jkl3.tar) will just have a ./ in front of the directory names. The first will not.
Relative path means the directory names are relative to your current directory.
If you wanted to restore from one of these tar file to a diffferent directory it is easy because you used relative.
If you want to restore ghi and jkl into /abc/mno, then you would do:
# mkdir /abc/mno
# cd /abc/mno
# tar -xvf ghi_jkl2.tar
or
# tar -xvf ghi_jkl3.tar
Now you will have /abc/mno/ghi and /abc/mno/jkl.
I much prefer dealing with relative pathing with commands like tar. It makes restores to different directories a whole lot easier.
I hope this explains it well enough for you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-12-2006 04:34 AM
тАО08-12-2006 04:34 AM
Re: Absolute path & Relative Path
Relative path means relative to the current position or directory.
some commands requires absolute path. best example is "swinstall"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-13-2006 10:55 AM
тАО08-13-2006 10:55 AM
Re: Absolute path & Relative Path
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-13-2006 01:22 PM
тАО08-13-2006 01:22 PM