- Download the file
clearTrashFromPendrive.sh
- Connect Pendrive to your mac
- Make sure pendrive is working
- Run
sh clearTrashFromPendrive.sh "PENDRIVE_NAME"
command in Terminal from the directory where you have downloaded the file. - That's it You're Done.
Last active
April 14, 2021 22:57
-
-
Save Salman-Shaik/74492800c5fbd6b1c73b1a2268bd98ef to your computer and use it in GitHub Desktop.
Pendrive Trash Cleaner in Mac
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
CURR_DIR=$(pwd) | |
if [[ $1 ]]; then | |
cd /VOLUMES/$1 | |
if [[ $? != 0 ]]; then | |
echo 'File Not Found' | |
exit | |
fi | |
echo 'Found Device '$1 | |
rm -rf .Trashes | |
echo 'Clean Completed' | |
cd $CURR_DIR | |
exit | |
fi | |
echo 'Filename Was Not Mentioned.Try Again.' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment