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-18-2003 06:40 PM
11-18-2003 06:40 PM
tar file
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-18-2003 06:45 PM
11-18-2003 06:45 PM
Re: tar file
"tar -xvf file.tar /home/edp/file2.* "
"tar -xvf file.tar /home/edp/file3.* "
"tar -xvf file.tar /home/edp/file4.* "
"tar -xvf file.tar /home/edp/file5.* "
"tar -xvf file.tar /home/edp/file5.* "
"tar -xvf file.tar /home/edp/file7.* "
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-18-2003 06:49 PM
11-18-2003 06:49 PM
Re: tar file
But if you want to extract all the files of file.tar into /home/edp then use
cd /home/edp ; tar xvf /absolutepathof/file.tar
This should extract all the files of file.tar in to the current directoy.
Thanks,
Madhu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-18-2003 06:57 PM
11-18-2003 06:57 PM
Re: tar file
You can use the steps below to restore all files in one shoot :
# cd /home/edp
# tar -xvf file.tar /home/edp/file*
OR this to restore all :
# cd /home/edp
# tar -xvf file.tar
To list the contains of file.tar :
# tar -tvf file.tar
Hope this information can help you.
Best Regards,
AW
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-18-2003 06:59 PM
11-18-2003 06:59 PM
Re: tar file
Otherwise you interact with blank file 8-).
Best Regards,
AW
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-18-2003 07:00 PM
11-18-2003 07:00 PM
Re: tar file
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-18-2003 07:25 PM
11-18-2003 07:25 PM
Re: tar file
if the files are stored with absolute path names in the tar file, the standard tar command will not be able to relocate them.
If you need to extract them to a different directory directly you have to look for a new tar programm. I think GNUtar (gtar) can do this.
Search for it on the porting center (e.g. http://hpux.asknet.de).
Hope this helps
Regards Stefan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-18-2003 07:45 PM
11-18-2003 07:45 PM
Re: tar file
pax -r
Or use the -C option to change the root-directory used by tar to another directory, for instance /tmp, and then move the files to the correct location.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-18-2003 07:50 PM
11-18-2003 07:50 PM
Re: tar file
If you want to restore EVERYTHING from the tar archive use:
tar -xvf file.tar
If you wish to restore everything starting with a certain pettern use:
tar -xvf file.tar /home/edp/file[2-7].\*
If you want to restore to a different path like Stefan mentioned you can also look into pax which is part of HP-UX.
Regards,
Trond
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-18-2003 07:51 PM
11-18-2003 07:51 PM
Re: tar file
You can use the steps below :
For example :
other directory is /destination
file.tar at /tmp
need to restore /home/edp/*
# cd /destination
# pax -pe -rvf /tmp/file.tar -s '/^\///' /home/edp
Hope this information can help you.
Best Regards,
AW
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-18-2003 07:52 PM
11-18-2003 07:52 PM
Re: tar file
you can use pax. First, copy yout tar archive to the directory in which you want to unpack it, e.g.:
# cp mytararchive.tar /mytardir
then place yourself in the directory:
# cd /mytardir
and extract the files from mytararchive.tar:
# pax -rv -s'/^\///' < ./mytararchive.tar
which will create the dir. structure of the files in mytararchive.tar and append this structure to the current dir. It is a bit of a hack and I have not tried it with a single file, only the whole tar archive. You should of course always cd to the directory where you create your tar archive and select by ./
regards,
John K.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-18-2003 08:08 PM
11-18-2003 08:08 PM
Re: tar file
If i understood well,try the following:
for i in 2 3 4 5 6 7
do
tar -xvf file.tar /home/edp/file$i.*
done
Regards