Remove Dot Underscore Files


/ Published in: Bash
Save to your folder(s)

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!


Copy this code and paste it in your HTML
  1. find . -name ".svn" -prune -o -name "._*" -exec rm -i {} \;

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.