Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Embedded tar files...

Status
Not open for further replies.

mxw128

Technical User
Aug 27, 2001
1
US
What is the syntax to extract a tar file from within a tar file? FOr example: I have a CD that has a several large tar files on it(let's call them tarA1.tar, tarA2.tar, etc). Each one is composed of some files and yet more tars (Let's call these tarB1.tar, tarB2.tar, etc) I want to extract just one of these B level tar files. Everything I seem to try just reads the CDROM with no action. I have tried: tar -xvf /cdrom/tarA1.tar tarB1.tar . and many permutations of it.

Any suggestions??

Thanks!!

mxw128
 
I suggest you find out the format of the filenames in the tar archive using tar tvf. This will tell you how the files are recorded in terms of pathname etc, without actually restoring them.

You should then be able to specify the appropriate file more specifically in your tar xvf command.

Eg. If you had a directory training which had been tarred up and appears in the tar tvf listing as ./training, you would need to extract a file called first_years in that directory using:

tar xvf <devicename> ./training/first_years

Hope this helps.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top