TAR help .....

Vu Pham vu at sivell.com
Thu Jan 22 12:03:07 PST 2009


Ben Duncan wrote:
> 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 ?
> 

To extract that single  file, I would do

# tar xvzf yourfile.tar export/usr1/thisdir/MYFILE

In this case your current directoy will have the whole 
export/usr1/thisdir/MYFILE there.

Normally if I need to get some files, I will do like above to a 
temporary directory, and will mv the files I need.


Vu




More information about the Linux-users mailing list