Skip to content

Instantly share code, notes, and snippets.

@3Samourai
Created October 26, 2024 14:34
Show Gist options
  • Save 3Samourai/5f56be79198bcbf701c8148cc164f3b2 to your computer and use it in GitHub Desktop.
Save 3Samourai/5f56be79198bcbf701c8148cc164f3b2 to your computer and use it in GitHub Desktop.
#!/bin/bash
# Unzip all .zip files in the current directory and its subdirectories
find . -type f -name "*.zip" | while read -r file; do
unzip "$file" -d "${file%.*}"
done
# Move all .zip files to the Trash
find . -type f -name "*.zip" | while read -r file; do
trash "$file"
done
echo "Unzipping completed and zip files moved to Trash."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment