HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: tar extracting specific directories
Operating System - HP-UX
1830676
Members
2690
Online
110015
Solutions
Forums
Categories
Company
Local Language
back
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
back
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- 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
06-21-2004 04:50 PM
06-21-2004 04:50 PM
tar extracting specific directories
Hi, I'm having problems extracting a tar archive from a multi-volume tape.
There are several directories on the tar file and I only want to extract a few subdirectories recursively.
I have tried:
tar -xvf /dev/rmt/0m /data1 /data2
but it doesn't extract the directories. It just reads until it prompts for the next device. This is a multi-volume tar tape consisting of seven 4gb tapes, and I *know* that /data1 would be on the first tape.
I've also tried
tar -xvf /dev/rmt/0m /data1/ /data2/
with just the same luck. And yes, if you ask, the /data1 and /data2 directories were backed-up with absolute directory paths.
Can anyone point out what I am doing wrong?
Thanks :)
There are several directories on the tar file and I only want to extract a few subdirectories recursively.
I have tried:
tar -xvf /dev/rmt/0m /data1 /data2
but it doesn't extract the directories. It just reads until it prompts for the next device. This is a multi-volume tar tape consisting of seven 4gb tapes, and I *know* that /data1 would be on the first tape.
I've also tried
tar -xvf /dev/rmt/0m /data1/ /data2/
with just the same luck. And yes, if you ask, the /data1 and /data2 directories were backed-up with absolute directory paths.
Can anyone point out what I am doing wrong?
Thanks :)
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-21-2004 05:00 PM
06-21-2004 05:00 PM
Re: tar extracting specific directories
Extracting specific directories from a tar files only needs that way they were backed up or tar'd
if you did a tar -cvf /dev/rmt/0m *
then to untar you need to do tar -xvf /dev/rmt/0m data1 data2
and if you tared using
tar -cvf /dev/rmt/0m .
then you need to do tar -xvf /dev/rmt/0m /data1
do a tar tvf to list how they are backed up, if you dont see "/" in front then just follow
tar -xvf /dev/rmt/0m data1 data2
That should restore the directories,
Cheers
Rajeev
if you did a tar -cvf /dev/rmt/0m *
then to untar you need to do tar -xvf /dev/rmt/0m data1 data2
and if you tared using
tar -cvf /dev/rmt/0m .
then you need to do tar -xvf /dev/rmt/0m /data1
do a tar tvf to list how they are backed up, if you dont see "/" in front then just follow
tar -xvf /dev/rmt/0m data1 data2
That should restore the directories,
Cheers
Rajeev
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-21-2004 07:11 PM
06-21-2004 07:11 PM
Re: tar extracting specific directories
I don't think anything wrong is being done. It seems tar will scan all the tapes to extract the required data.
sks
sks
A rigid mind is very sure, but often wrong. A flexible mind is generally unsure, but often right.
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP