[ale] Untar a bunch of .tar.gz and .tgz files

Yu, Jerry Jerry.Yu at Voicecom.com
Wed Sep 29 16:06:13 EDT 2004


it is tar that was irritated. *.tgz was globbed to "1.tgz 2.tgz 3.tgz" and
passed to tar as its arguments.
'tar 1.tgz 2.tgz 3.tgz' means you want to extract 2.tgz and 3.tgz from
archive '1.tgz', which doesn't contain 2.tgz or 3.tgz, thus the message "all
the files listed saying 'Not found in archive'. In this case, 1.tgz is the
archive that the message was referring to.

-----Original Message-----
From: ale-bounces at ale.org [mailto:ale-bounces at ale.org]On Behalf Of Mike
Murphy
Sent: Wednesday, September 29, 2004 3:50 PM
To: Atlanta Linux Enthusiasts
Subject: Re: [ale] Untar a bunch of .tar.gz and .tgz files


The globs are irritating the shell and/or tar. One quick way to to di it 
(assuming gnu tar and a bourne shell like shell):

dir = dir with files in them

cd $dir; for file in `ls *.tar.gz`; do tar -zxf $file; done

Mike


Trey Sizemore wrote:
> If I have a folder containing a number of .tar.gz and .tgz files and wish
to 
> untar them all, how would I go about doing so?  I've tried tar xvfz
*.tar.gz 
> and tar xvfz *.gz as well as several other variations, but they all just 
> error out with something like all the files listed saying 'Not found in 
> archive'
> 
> Thanks.
> 
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Ale mailing list
> Ale at ale.org
> http://www.ale.org/mailman/listinfo/ale

-- 

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Mike Murphy
781 Inman Mews Drive Atlanta GA 30307
Landline: 404-653-1070
Mobile: 404-545-6234
Email: mike at tyderia.net
AIM: mmichael453
JDAM: 33:45:14.0584N  84:21:43.038W
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
_______________________________________________
Ale mailing list
Ale at ale.org
http://www.ale.org/mailman/listinfo/ale



More information about the Ale mailing list