<p>The <code>unzip</code> command doesn't have an option for recursively unzipping archives.</p>

<p>If I have the following directory structure and archives:</p>

<pre>
/Mother/Loving.zip
/Scurvy/Sea Dogs.zip
/Scurvy/Cures/Limes.zip
</pre>

<p>And I want to unzip all of the archives into directories with the same name as each archive:</p>

<pre>
/Mother/Loving/1.txt
/Mother/Loving.zip
/Scurvy/Sea Dogs/2.txt
/Scurvy/Sea Dogs.zip
/Scurvy/Cures/Limes/3.txt
/Scurvy/Cures/Limes.zip
</pre>

<p>What command or commands would I issue?</p>

<p>It's important that this doesn't choke on filenames that have spaces in them.</p>

Here's one solution that extracts all zip files to the
working directory
and involves the find command and a while loop:
```
```
find . -name "*.zip" | while read filename; do unzip -o -d "`basename -s .zip "$filename"`" "$filename"; done;
```
```