Skip to content

Instantly share code, notes, and snippets.

@micronax
Created January 6, 2015 13:11
Show Gist options
  • Save micronax/3c108afd5d1f2ce55d6f to your computer and use it in GitHub Desktop.
Save micronax/3c108afd5d1f2ce55d6f to your computer and use it in GitHub Desktop.
Remove useless OSX cache files
#!/bin/bash
if [ "$CODA_SITE_LOCAL_PATH" != "" ]; then
cd "$CODA_SITE_LOCAL_PATH"
# http://www.westwind.com/reference/os-x/invisibles.html
find . -name 'Thumbs.db' -exec rm -rf {} \; # Windows
find . -name '.DS_Store' -exec rm -rf {} \; # Mac OSX
find . -name '._*' -exec rm -rf {} \; # Mac OSX resource forks
find . -name '_notes' -exec rm -rf {} \; # Dreamweaver
#find . -name '.ceid' -exec rm -rf {} \; # PogoPlug
#find . -name '.cedata' -exec rm -rf {} \; # PogoPlug
find . -name 'error_log' -exec rm -rf {} \; # Apache via MAMP
find . -regex '^core.[0-9]{4,}$' -exec rm -rf {} \; # core dumps
fi
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment