How do you untar a specific file to a specifc directory? Here is how you untar a specific file from within the tar, but i duno how to specify a "to" locationtar --extract --file=foo.tar dir1/conf/myprop.properties that will create 2 dirs (dir1 and conf) and 1 file within my cwd called myprop.properties. I want to extract myprop.properties to /home/ryan (without the dir1/conf directory structure being extracted).Thanks in advance.
11/30/2007 12:18:55 PM
type the following into your terminal and read the output:man tar
11/30/2007 12:33:54 PM
I don't think tar can do this because of the file format. You can do it with cpio/pax:
pax -rs ',^dir1/conf/,,' -s ',^dir1/conf,,' -s ',^dir1,,' -f foo.tar
12/1/2007 1:48:56 AM
The closest you're probalby going to be able to do istar -x -C /home/ryan -f foo.tar dir1/conf/myprop.propertiesthis will extract it to /home/ryan/dir1/conf/myprop.properties
12/1/2007 1:00:36 PM
^yep, thats what I'm doing now, wanted to avoid that if possible.^^^I don't post here before doing research on my own, to prevent wasting others time. Thanks for wasting mine.
12/7/2007 11:12:18 AM
oh, don't want to waste time un-taring files?easy... just change your major.. lol[Edited on December 7, 2007 at 11:21 AM. Reason : lol]
12/7/2007 11:20:52 AM