- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: 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
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
10-07-2007 03:46 PM
10-07-2007 03:46 PM
i have a tar file files.tar
the contents is:
/home/user1/files/file1/*.*
/home/user1/scripts/scrpts/*.*
...........
...........
i want to untar the files under /opt
how can i untar the files ..
i'm using
tar -xvf interface.tar
but it is being un tar the files under /home filesystem, i want they be untar under /opt fs
how can i do that?
thanks.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-07-2007 03:57 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-07-2007 04:02 PM
10-07-2007 04:02 PM
Re: tar command
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-07-2007 04:26 PM
10-07-2007 04:26 PM
Re: tar command
>how can I tar the files without using relative path?
You already did. Or did you mean untar?
In that case you need to use pax(1).
$ cd /opt
$ pax -r -f interface.tar -s:/home/user1/::
This will create /opt/files and /opt/scripts
>WK: You may not be able to untar in /opt.
Sure you can. Unless you mean you have to unpax them. :-)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-07-2007 04:42 PM
10-07-2007 04:42 PM
Re: tar command
> need to use pax(1) [...]
Or GNU "tar".
http://www.gnu.org/software/tar/
http://www.gnu.org/software/tar/manual/index.html
http://www.gnu.org/software/tar/manual/tar.html#transform
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-07-2007 04:57 PM
10-07-2007 04:57 PM
Re: tar command
pax(1) is supported and Posix standard.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-07-2007 05:13 PM
10-07-2007 05:13 PM
Re: tar command
And GNU "tar" works, and claims a level of
POSIX compliance/conformance:
http://www.gnu.org/software/tar/manual/tar.html#posix
A statement like "You need to use pax.",
while common around here, is not strictly
true. It may be true that "pax" will solve
the problem, but "pax" is not the only
solution, and it may not be the _best_
solution. (Isn't this obvious?)