- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: untar to a specific directory
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
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
тАО03-06-2009 02:34 PM
тАО03-06-2009 02:34 PM
untar to a specific directory
i want to untar it into /u04 what would the command be ??
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-06-2009 02:41 PM
тАО03-06-2009 02:41 PM
Re: untar to a specific directory
man pax
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-06-2009 02:43 PM
тАО03-06-2009 02:43 PM
Re: untar to a specific directory
In future don't create the tar files with the fill path.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-06-2009 02:46 PM
тАО03-06-2009 02:46 PM
Re: untar to a specific directory
pax -f file.tar -r -s":/u01:/u04:"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-06-2009 07:29 PM
тАО03-06-2009 07:29 PM
Re: untar to a specific directory
What is a 'fill path' ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-06-2009 08:52 PM
тАО03-06-2009 08:52 PM
Re: untar to a specific directory
> executed [...]
Use "cd" to get past the part of the path
which you don't want, and don't use a leading
slash in the "tar" command. For example:
cd /u01
tar cf x.tar app/oracle/product/10.2.0
cd /u04
tar xf ../u01/x.tar
(Of course, if you just wanted to copy the
whole tree, a pipeline could obviate the
"tar" archive itself.)
> What is a 'fill path' ?
What's the key jist to the left of the "I"?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-06-2009 09:12 PM
тАО03-06-2009 09:12 PM
Re: untar to a specific directory
Why worry about it when you have a better utility pax, that allows renaming?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-07-2009 07:43 PM
тАО03-07-2009 07:43 PM
Re: untar to a specific directory
To achieve that i would always do it that in a way like
#cd /u01/app/oracle/product/10.2.0
#tar cvf /u04/file.tar *
Once that is over , go to another directory say /u04
#cd /u04
#tar xvf file.tar .
you can also take the help of fbackup if like
#cd /u01/app/oracle/product/10.2.0
#fabckup -0vf /u04/file.back /u01/app/oracle/product/10.2.0
#cd /u04
#frecover -rXf file.back
regards
sujit
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-07-2009 08:13 PM
тАО03-07-2009 08:13 PM
Re: untar to a specific directory
> #tar cvf /u04/file.tar *
I would (almost) never use "*" that way. It
will miss dot-names (like ".profile"), and
the result might exceed the command line
length limit (if "*" expands to a long list).
> #tar xvf file.tar .
Why "."? Did you try this?