unpacking individual files from ta archive

unpacking individual files from ta archive

Post by Neil Zanell » Thu, 04 Mar 1999 04:00:00



Hello,

Is it possible to unpack individual files from a .tar archive without

extracting the contents of the whole archive?

Thanks.

 
 
 

unpacking individual files from ta archive

Post by Mario Stargar » Thu, 04 Mar 1999 04:00:00


        Yes.  Use tar tvf <filename> to list the contents so you know what the
file is called.
        Like this:


tar: blocksize = 8
drwxr-xr-x 5099/115      0 Feb 10 09:57 1999 work/
-rwxr-xr-x 5099/115    513 Feb 10 10:18 1999 work/junk
-rwxr-xr-x 5099/115    225 Feb 10 10:13 1999 work/harness

tar: blocksize = 8
x work/junk, 513 bytes, 2 tape blocks

        Cheers,
                Mario


> Hello,

> Is it possible to unpack individual files from a .tar archive without

> extracting the contents of the whole archive?

> Thanks.

--
Mario Stargard
Unix Systems Administrator
(613) 781 1373

 
 
 

unpacking individual files from ta archive

Post by Ole Michaelse » Thu, 04 Mar 1999 04:00:00


Quote:Neil Zanella writes:

> Is it possible to unpack individual files from a .tar archive without
> > extracting the contents of the whole archive?

"man tar" is your friend:

"tar xvf... /dev/rmt/0 `tar tf...  /dev/rmt/0  | grep 'pattern'`" to
extract the files from the archive on /dev/rmt/0 which matches the
pattern 'pattern'.

--
Regards,
Ole Michaelsen, Copenhagen, Denmark

 
 
 

unpacking individual files from ta archive

Post by Kurt J. Lanz » Thu, 04 Mar 1999 04:00:00



> Hello,

> Is it possible to unpack individual files from a .tar archive without

> extracting the contents of the whole archive?

Have you tried the man page? As I read it, the answer is yes.