Printable Version of Topic

Click here to view this topic in its original format

Linuxhelp _ Technical Support _ UNTAR single file from TAR tree!

Posted by: Diego125k Dec 6 2011, 01:56 PM

Hello everyone! I need to to uncompress "somefile.txt" from "home.tar", and this last one is inside "daily.tar.gz".

I could untar home.tar by: $tar --extract --file=daily.tar.gz path/to/home.tar

and then untar file.txt from home.tar by: $tar --extract --file=home.tar somefile.txt

finally i could "cat file.txt"...

THE PROBLEM IS: It is a daily backup and it is impossible for me to download to my linux box, then untar on my local disk.
I can SSH the server but can't untar daily.tar.gz or home.tar because of the size

How can i UNTAR just somefile.txt from home.tar, inside daily.tar.gz on the fly?

THANKS A LOT!!!

Posted by: michaelk Dec 6 2011, 02:16 PM

Have you tried?
tar -zxvf daily.tar.gz somefile.txt

Posted by: Diego125k Dec 6 2011, 02:25 PM

QUOTE (michaelk @ Dec 6 2011, 04:16 PM) *
Have you tried?
tar -zxvf daily.tar.gz somefile.txt


Thanks for the response.

$ tar -zxvf daily.tar.gz somefile.txt
tar: archivito.txt: Not found in archive
tar: Exiting with failure status due to previous errors

It is because somefile.txt is inside home.tar, and home.tar is inside daily.tar.gz... not at root

Thanks in advance

Posted by: michaelk Dec 6 2011, 09:39 PM

I do not know of a method.

Posted by: Diego125k Dec 7 2011, 07:00 AM

Oka, thanks

Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)