Skip to content

Instantly share code, notes, and snippets.

@ben-p-commits
Created December 9, 2016 15:58
Show Gist options
  • Save ben-p-commits/53f81d148516e0c84576e76a3c967ab6 to your computer and use it in GitHub Desktop.
Save ben-p-commits/53f81d148516e0c84576e76a3c967ab6 to your computer and use it in GitHub Desktop.
Clean up typical desktop cruft
#clean up cruft on the desktop.
Y="\033[1;33m"
R="\033[0;31m"
G="\033[0;32m"
B="\033[0;34m"
NC="\033[0m"
echo "${G}Cleaning up image cruft:${R}"
for a in ~/Desktop/*.(png|jpg|jpeg|gif)(.N); do
rm -rv $a;
; done
echo "${Y}... Done!"
echo "${G}Cleaning up misc cruft:${R}"
for a in ~/Desktop/*.(|zip|dmg|pkg|tar*)(.N); do
rm -ri $a;
; done
echo "${Y}... Done!"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment