Skip to content

Instantly share code, notes, and snippets.

@PBXg33k
Created August 21, 2022 08:33
Show Gist options
  • Save PBXg33k/98ae521a43ca11187cf6085c716ecb73 to your computer and use it in GitHub Desktop.
Save PBXg33k/98ae521a43ca11187cf6085c716ecb73 to your computer and use it in GitHub Desktop.
Find zipfiles in current path recursively and unzip each zipfile to a subdirectory with the filename and delete zip if extraction was succesful
find . -iname '*.zip' | while read filename; do (7z x -o"${filename%.*}" "$filename" && rm "$filename"); done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment