Skip to content

Instantly share code, notes, and snippets.

@waviaei
Last active November 29, 2017 00:39
Show Gist options
  • Save waviaei/e8ce8c79fba95faef652 to your computer and use it in GitHub Desktop.
Save waviaei/e8ce8c79fba95faef652 to your computer and use it in GitHub Desktop.
cleaning unwanted files
#!/bin/sh
# Mac: Unlock everything
sudo chflags -R nouchg .
# Mac: Delete all .DS_Store
find . -name ".DS_Store" -print -exec rm {} ";"
# DW: Delete all /_notes/
find . -name "_notes" -print -exec rm -r {} ";"
# DW: Delete all " - copy" files
find . -name "* - copy.*" -print -exec rm -r {} ";"
# DW: Delete all .LCK
find . -name "*.LCK" -print -exec rm {} ";"
# Delete all ._
find . -name "._*" -print -exec rm {} ";"
# Delete all .apdisk
find . -name ".apdisk" -print -exec rm {} ";"
# Delete all Thumbs.db
find . -name "Thumbs.db" -print -exec rm {} ";"
# Delete all Desktop.ini
find . -name "Desktop.ini" -print -exec rm {} ";"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment