- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: tar help
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
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
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
11-09-2005 07:43 AM
11-09-2005 07:43 AM
tar help
A tar file (of /opt) was coptied from one system to another.
I want to untar this file to a directory say /tmp/opt instead of overwriting my /opt directory.
Can this be done?
What is the syntax I can use?
Thank you,
Randy
- Tags:
- tar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-09-2005 07:53 AM
11-09-2005 07:53 AM
Re: tar help
- Tags:
- pax
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-09-2005 07:54 AM
11-09-2005 07:54 AM
Re: tar help
Relative path, you were in the /opt directory and issued the tar command.
tar -cvf mytarball.tar *
In this case, you can go into the /tmp/opt directory and do the 'tar -xvf mytarball.tar'
If absolute path, you issued the tar command as such;
'tar -cvf /opt'
In this case, doing an un-tar will overwrite the /opt directory, not a wise idea. Doesn't matter what the CWD is.
If you have an absolute tarball, you can use the 'pax' utility
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-09-2005 08:00 AM
11-09-2005 08:00 AM
Re: tar help
In Tru64 is "s" option. If you don't have that option, you should create the tarfile using relative path.
cd /opt
tar cvf /backup/tarfile ./*
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-09-2005 05:57 PM
11-09-2005 05:57 PM
Re: tar help
# tar -tvf
You can get details. If it is absolute then move /opt contents related with tarfile with .old notation.
Extract contents and then move it to /tmp/opt. You can not move with tar to all files.
hth.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-09-2005 06:07 PM
11-09-2005 06:07 PM
Re: tar help
I had experiance of restoring the /usr directory from one server to other server where /usr tampered .
I suggest you to restore it in /tmp location then check the file permissions are Ok .. If it's OK
Proceed to do a TAR in absolute path