[lug] Recursive Unzip

Chip Atkinson chip at pupman.com
Wed Apr 5 07:47:57 MDT 2006


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
> -- 
> root *is* my user account!
>     Matt Thompson -- http://ucsub.colorado.edu/~thompsma/
>     440 UCB, Boulder, CO  80309-0440
>     JILA A510, 303-492-4662
> _______________________________________________
> Web Page:  http://lug.boulder.co.us
> Mailing List: http://lists.lug.boulder.co.us/mailman/listinfo/lug
> Join us on IRC: lug.boulder.co.us port=6667 channel=#colug
> 




More information about the LUG mailing list