Recursively Remove .DS_Store Files and .svn Dirs

Posted on November 01, 2007

These commands are good to run right before doing a svn checkin for the first time.

Those pesky .DS_Store files on OS X:

find . -type f -name .DS_Store | xargs rm -rf

Let’s say you’ve copied over some files from another svn project. To remove the existing .svn dirs:

find . -type d -name .svn | xargs rm -rf

And for good measure, the Thumbs.db file that Windows generates automatically:

find . -type f -name Thumbs.db | xargs rm -rf