- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- How to extract files into a perticular directory f...
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
тАО08-05-2004 09:58 PM
тАО08-05-2004 09:58 PM
How to extract files into a perticular directory from a tar file
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-05-2004 10:04 PM
тАО08-05-2004 10:04 PM
Re: How to extract files into a perticular directory from a tar file
tar xvf backup.tar
sks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-05-2004 10:04 PM
тАО08-05-2004 10:04 PM
Re: How to extract files into a perticular directory from a tar file
Go to the directory where you want to extract
the tar file &
use:
#tar -xvf file.tar
where file.tar is present in that directory.
Regards,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-05-2004 10:06 PM
тАО08-05-2004 10:06 PM
Re: How to extract files into a perticular directory from a tar file
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-05-2004 10:09 PM
тАО08-05-2004 10:09 PM
Re: How to extract files into a perticular directory from a tar file
assume that your tar file is /tmp/a.tar
you need to extract that in directory /usr/ravi
#mkdir /usr/ravi
#cd /usr/ravi
#tar xvf /tmp/a.tar .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-05-2004 10:17 PM
тАО08-05-2004 10:17 PM
Re: How to extract files into a perticular directory from a tar file
-C directory causes tar to perform a chdir() to directory (see chdir(2)). Subsequent file and -C directory arguments are relative to directory. This allows multiple
directories not related by a close or common parent to be archived using short relative path names.
However I couldn't succeed in using this. I am trying.
sks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-05-2004 10:18 PM
тАО08-05-2004 10:18 PM
Re: How to extract files into a perticular directory from a tar file
tar with -C option is used to do operation on a file located in another directory and make tar operations on that directory with going to that.
pwd /
tar file is located over /home/test/test.tar
then,
[/] tar -C /home/test -xvf /home/test/test.tar
It will archieve files over at /home/test/test directory
This operation is same to hp-ux and linux too.
Regards
Muthu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-05-2004 10:25 PM
тАО08-05-2004 10:25 PM
Re: How to extract files into a perticular directory from a tar file
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-05-2004 10:28 PM
тАО08-05-2004 10:28 PM
Re: How to extract files into a perticular directory from a tar file
Please cd into the directory and do the 'tar -xvf
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-05-2004 10:47 PM
тАО08-05-2004 10:47 PM
Re: How to extract files into a perticular directory from a tar file
tar: You must specify one of the `-Acdtrux' options
Try `tar --help' for more information.
-C is used to change the directory, as
-C, --directory=DIR change to directory DIR
So it is used to reduce to change directory to operate the tar.
It is same as,
cd /home/test;tar xvf test.tar
tar -C /home/test -xvf /home/test/test.tar
Regards
Muthukumar.