- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Using TAR command
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
Forums
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
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
тАО01-22-2002 05:06 AM
тАО01-22-2002 05:06 AM
I'm trying to restore an specific file from my DLT tape, using the tar command.
How do I specify the destination directory to restore this file??
Thanks!
Tiago
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-22-2002 05:07 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-22-2002 05:11 AM
тАО01-22-2002 05:11 AM
Re: Using TAR command
It all depends how the files were backed up.
If you used relative pathnames, then cd into the directory before restoring.
If absolute, then, depending on the original directory, you could create a soft link from the old directory to the new directory before restoring.
Rgds, Robin.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-22-2002 05:26 AM
тАО01-22-2002 05:26 AM
Re: Using TAR command
just specify the file name to be extracted. If the path exist in the system where you are extracting, file will be extracted in that path, other wise system will create the extracting file's path.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-22-2002 05:37 AM
тАО01-22-2002 05:37 AM
Re: Using TAR command
If you created the tar file using relative pathnames for the input files, tar will extract the files to locations relative to your current directory.
If you created the tar file using absolute pathnames for the input files, tar will extract the files to that absolute path.
An alternative for changing the extract destination for a tar file created with absolute pathnames is to use pax. An example is:
tar cvf /tmp/users.tar /home/users
tar xvf /tmp/users.tar
will extract files back to their original locations because the input file/dir was specified with an absolute pathname (/home/users)
pax -r -s,/home/users,/home/users2, -f /tmp/users.tar
will extract files changing /home/users to /home/users2
See the man page for more info.
Darrell
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-15-2004 04:00 PM
тАО01-15-2004 04:00 PM
Re: Using TAR command
when i exacute the following cmd,error occure.why ?thanks!
# pax -r -s,/testdb/test/,/testdb/testx,-f /ovdbf/bak.tar
pax: A replacement string was not added : An invalid trailing option was speci
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-15-2004 05:42 PM
тАО01-15-2004 05:42 PM
Re: Using TAR command
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-15-2004 06:40 PM
тАО01-15-2004 06:40 PM
Re: Using TAR command
you are right!
thank you very much!