Tuesday, February 14, 2012

Unzip

Unzip multiple zip files using Shell script

Scenario: You have quite a large number of zip files in a folder with other files and would like to avoid manual labor of extracting one file at a time.

The below graphic is the result of extracting an e-book downloaded from the web in compressed format.


Solution: A simple shell script to extract all files at one go.

Save the script with a .shextension and make sure it resides in the same directory as the compressed files.

Fire up the terminal, cd to the target directory and execute the script using ./xxxx.sh