Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- find . -maxdepth 1 -type f -size +1M |
- while read -r filename
- do
- echo "$filename"
- read -r -p "Delete the file? [Y/n] "
- case $REPLY in
- [yY])
- echo "Skipping deletion for testing purposes." # TESTING
- # rm -v -- "$filename" # TESTING - commented out
- ;;
- [nN])
- echo "Skipping deletion." # TESTING
- ;;
- *)
- echo "Invalid input: $REPLY"
- exit 1
- ;;
- esac
- done
Add Comment
Please, Sign In to add comment