how to untar a subdirectory within a tar directory in linux

Skunks is there a command in linux that can help me untar a specific sub-directory within a tarred dir without uncompressing the whole directory. I only need contents in the subdirectory untarring the entire directory will take ages and i dont have the diskspace

On Tue, Apr 6, 2010 at 9:43 AM, saich <saiched@gmail.com> wrote:
Skunks is there a command in linux that can help me untar a specific sub-directory within a tarred dir without uncompressing the whole directory. I only need contents in the subdirectory untarring the entire directory will take ages and i dont have the diskspace _______________________________________________
List the contents of the archive by: tar tzf archive.tar.gz (archive.tgz) Once you get to know the hierarchy, you can do tar zxf archive.tgz directory/path/ man tar. -- Best regards, Odhiambo WASHINGTON, Nairobi,KE +254733744121/+254722743223 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ "If you have nothing good to say about someone, just shut up!." -- Lucky Dube

On Tue, Apr 6, 2010 at 9:43 AM, saich <saiched@gmail.com> wrote:
Skunks is there a command in linux that can help me untar a specific sub-directory within a tarred dir without uncompressing the whole directory. I only need contents in the subdirectory untarring the entire directory will take ages and i dont have the diskspace
did you try man?
From "man tar" tar -xzf foo.tar.gz blah.txt extract the file blah.txt from foo.tar.gz
Hint: if you have a large archive then: -t, --list will list the contents of an archive. You can pipe this to a text file and view that so you know exactly what to extract. BR, S -- Sent from my socks®
participants (3)
-
Odhiambo Washington
-
saich
-
Steve Muchai