[lug] Recursive Unzip

Hugh Brown hugh at math.byu.edu
Wed Apr 5 11:50:37 MDT 2006


I'd worry about where the unzipped files would end up and whether they'd
clobber each other or not.

Hugh

On Wed, 5 Apr 2006, Chip Atkinson wrote:

> There's find and xargs.  Something like
> find . -name "*.zip" -exec unzip {} \;
> or
> find . -name "*.zip" -print0 | xargs -0 unzip
>
> The print0/-0 is useful if you have spaces in your file names.
> Chip
>
> On Wed, 5 Apr 2006, Matt Thompson wrote:
>
> > This is probably an FAQ, but I can't really find a good answer.  Namely,
> > I have a folder that contains many folders with many .zip'ed files
> > inside each folder (e.g., 15 folders with 30 .zip files in each).
> >
> > Now, I know unzip can't travel down the structure and unzip every file
> > in each directory.  But, I wondered if there was some odd Linux utility
> > that someone created that can do this sort of task?
> >
> > Or should I use my lazy fingers and write the, admittedly easy, shell
> > script myself?
> >
> > Matt



More information about the LUG mailing list