TAR help .....
james at jamesmcdonald.id.au
james at jamesmcdonald.id.au
Thu Jan 22 12:26:49 PST 2009
> Ok, I have a tar file. When you tzr tvzf , you have a list that shows
> something
> like :
> ....
> ......
> export/usr1/thisdir/afile
> export/usr1/thisdir/MYFILE
> .....
> ......
> ....... (and so one ..)
>
> and you want to extract ONLY MYFILE and you want it extracted
> in the directory you are in and NOT the WHOLE tree
> How do you do that ?
>
Basic syntax is:
tar -xzf foo.tar.gz blah.txt
extract the file blah.txt from foo.tar.gz
but...
if you have.
usr1/MYFILE
usr1/thisdir/MYFILE
it will probably extract both MYFILE's
but I think you can specify it using a relative path
tar -xzf foo.tar.gz thisdir/MYFILE
More information about the Linux-users
mailing list