Recursive unzipping many zip and rar files in many folders.

So I have a directory with ~100 folders, each containing atleast 1 zip/rar file that needs extraction. No point in keeping the zip/rar file afterwards either so remove it.

find . -name "*.zip" -exec unzip {} \; -exec /bin/rm {} \;

Above code works a treat, but may need the use of unzip -n or -o for (n)ever or (o)verwrite, or unrar x for rars.

Codemonkey of Node.js, Django, PHP and all things HTML5 Solving tech challenges, one bit at a time.

Posted in bash, compression, linux Tagged with: , , , , , , ,

Leave a Reply

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

*