Created
October 26, 2024 14:34
-
-
Save 3Samourai/5f56be79198bcbf701c8148cc164f3b2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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