Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Recursively unzip
#
# I used this command to recursively unzip the files I downloaded from PRISM.
# Data is structured as
#
# tmin
# -- 1981
# ----xxx.zip
# ----xxy.zip
# -- 1982
# ----xxx.zip
# ----xxy.zip
#
# I wanted to extract all zips in their corresponding folders and then delete the zip files.
find . -name "*.zip" | while read filename; do unzip -o -d "`dirname "$filename"`" "$filename"; rm "$filename"; done;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment