Return to Snippet

Revision: 13282
at April 17, 2009 11:35 by shaunchapman


Initial Code
find . -name ".svn" -prune -o -name "._*" -exec rm -i {} \;

Initial URL

                                

Initial Description
Mac OS X creates files beginning with *._* to Samba shares when files on a Unix/Linux machine are accessed with a Mac.  I use [Coda](http://www.panic.com/coda/) to access a Samba share on my development server at work.  This is really annoying when checking the status of the Subversion repository.  So, I've come up with a solution to remove those files while ignoring similarly named files in hidden Subversion directories.  This command will ask you to confirm that you want to remove each file.

For added convenience, I suggest making this an alias (add `alias dot_clean='find . -name ".svn" -prune -o -name "._*" -exec rm -i {} \;'` to the *.bashrc*, *.bash_profile*, or *.bash_login* file in your home directory).  To clean a directory, simply type `cd directory_name` then `dot_clean`.  Enjoy!

Initial Title
Remove Dot Underscore Files

Initial Tags
mac, windows

Initial Language
Bash