«

»

Sep 24

Unzipping all Zip files in a directory

I don’t know why zip can’t handle multiple inputs, but it cant’. Gzip does just fine unzipping everything in a directory, I use this little “script” all the time on the command line to unzip all the files in a directory.

for file in $(ls *.zip) 
do 
  echo $file 
  unzip -o $file 
done

Its a small simple script, but it’s useful.

 

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>