Created
August 16, 2017 12:53
-
-
Save jzeferino/a84ab00fcd7df2d794172e8e6a13466c to your computer and use it in GitHub Desktop.
Removes bin, obj and packages from current folder recursively
This file contains hidden or 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 | |
declare -a arr=("obj" "bin" "packages") # Remove/add folders you want to clean up. | |
read -p "Delete $(printf "%s, " "${arr[@]}")folders under $PWD? (y/n) " answer | |
case ${answer:0:1} in | |
y|Y ) | |
for folder in "${arr[@]}" | |
do | |
echo "Cleaning $folder" | |
find . -name $folder -type d -exec rm -rf {} + | |
done | |
esac |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment