TAR help .....

Ben Duncan bend at linux4ms.net
Thu Jan 22 13:30:03 PST 2009


But it will create the directories as well. I am just after getting
the single file out.

james at jamesmcdonald.id.au wrote:
> Basic syntax is:
> tar -xzf foo.tar.gz blah.txt
>               extract the file blah.txt from foo.tar.gz
> 
> but...V>> 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 ?
>>
> 

> 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
> 
> 
> 
> _______________________________________________
> Linux-users mailing list ( Linux-users at linux-sxs.org )
> Unsub/Password/Etc: 
> http://linux-sxs.org/mailman/listinfo/linux-users
> 
> Need to chat further on this subject? Check out #linux-users on irc.linux-sxs.org !
> 


-- 
Ben Duncan - Business Network Solutions, Inc. 336 Elton Road  Jackson MS, 39212
"Never attribute to malice, that which can be adequately explained by stupidity"
        - Hanlon's Razor




More information about the Linux-users mailing list