Created
July 7, 2015 21:06
-
-
Save emotality/4019743a45001619ba0f to your computer and use it in GitHub Desktop.
Force empty Trash for all volumes in OSX.
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 | |
#### Created by Jean-Pierre Fourie | |
### https://github.com/emotality | |
## force_empty_trash.sh | |
# | |
clear | |
echo " " | |
echo " ####################################################### " | |
echo " ################## FORCE EMPTY TRASH ################## " | |
echo " ####################################################### " | |
echo " " | |
echo " ** Note: This will permanently delete all your volumes' Trash. **" | |
echo " " | |
read -p " Force empty all your Trash? [y/n]: " answer | |
case "$answer" in | |
y|Y ) sudo rm -rf ~/.Trash; sudo rm -rf /Volumes/*/.Trashes;; | |
n|N ) echo " Then what are we doing here? \n"; exit;; | |
* ) echo " Invalid option.. Exiting. \n"; exit;; | |
esac | |
echo " Your Trash has been emptied! \n" | |
killall Dock | |
exit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment