Here is a quiz tip to unzip several zip files found in a directory to their own directories.
Use this command from the folder where zip files are to be found
1 |
find . -name '*.zip' -exec sh -c 'unzip -d "${1%.*}" "$1"' _ {} \; |
To make sure that output folders will be created as per required, let’s print unzip commands with an echo using the command below
1 |
find -name '*.zip' -exec sh -c 'echo unzip -d "${1%.*}" "$1"' _ {} \; |
I hope this helps, if you come across some other way, please share it with others.
Leave a Reply