- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Restoring one file from a tar archive
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
05-28-2003 08:30 AM
05-28-2003 08:30 AM
Restoring one file from a tar archive
I am trying to restore a single file from a tar archive. The syntax that I used was
tar -xvf ./seaberg/1lmn.egsimp
The problem I am confronting is tar restoring the entire seaberg directory contents rather than just the 1lmn.egsimp file. What other syntax do I need to have in the command?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-28-2003 08:34 AM
05-28-2003 08:34 AM
Re: Restoring one file from a tar archive
the sintax is
tar -xvf ARCHIVE FILE
when you put the "-f" you are going to specify the file you want to use (e.g. myfile.tar) or a tape device, (e.g. /dev/rmt/0m).
So
ARCHIVE = yourarchive
FILE =
./seaberg/1lmn.egsimp
Supposing you want to extract the file you have mentioned in the mail.
HTH,
Massimo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-28-2003 08:38 AM
05-28-2003 08:38 AM
Re: Restoring one file from a tar archive
# tar xvf seaberg 1lmn.egsimp
(tar xvf archive file)
Regards,
Fr??d??ric
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-28-2003 08:40 AM
05-28-2003 08:40 AM
Re: Restoring one file from a tar archive
Restore one file
#tar xvf /dev/rmt/0m (file)
Here is a good doc,
http://www5.itrc.hp.com/service/cki/docDisplay.do?docLocale=en_US&docId=200000063197953
Hope it helps,
Robert-Jan.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-28-2003 08:41 AM
05-28-2003 08:41 AM
Re: Restoring one file from a tar archive
If you created a tarball file try:
# tar -xvf filename.tar ./seaberg/1lmn.egsimpz
If you created a tar tape:
# tar -xvf /dev/rmt/?m ./seaberg/1lmn.egsimp
To see what exactly is in the tar file so you can get the file name syntax correct:
# tar -tvf filename.tar
or
# tar -tvf /dev/rmt/?mn
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-28-2003 09:13 AM
05-28-2003 09:13 AM
Re: Restoring one file from a tar archive
You need to do a tar tvf on the input file/device to determine whether the file paths are absolute (/path/to/file) or relative (./path/to/file)
You must use the proper syntax in the command - either:
Absolute -> tar xvf /dev/rmt/0mn /path/to/file
Relative -> tar xvf /dev/rmt/0mn ./path/to/file
Using the wrong syntax will not work.
Rgds,
Jeff