How to extract all zip files within multiple subdirectories

In Mac OS X, using the Terminal application, it is possible to uncompress all zip files that are littered within a directory structure with a single command: 

find . -iname "*.zip" -type f -print -execdir ditto -x -k --sequesterRsrc '{}' '.' \;

To use this command, you first has to ‘cd’ to the root of the directory structure you are working with and then type in the above listed command. The ‘ditto’ app will then decompress every file that it is sent from the ‘find’ command. This is a very useful command, especially if you have projects where files have to be zipped up before they are sent to the version control server.  Enjoy! 

Leave a Reply

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