Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there a command line to remove all "._foo.html" files in a directory on Unbuntu?

share|improve this question
up vote 10 down vote accepted
rm ./._*

more stuff since it must be at least 15 characters.

share|improve this answer
Also, this resource may be helpful in preventing their creation in the first place. – Chris Nava Jun 23 '10 at 21:14

I use the following command to remove all of those annoying Apple files, but this one also does it recursively through all sub-directories, too:

# find . -iname '._*' -exec rm -rf {} \;
share|improve this answer
+1 I came back to my question after I realized a recursive version of this command is what I really need. Thank you for adding the answer. – Christopher Altman Jun 28 '10 at 15:14
awesome. This one should be accepted as answer rather than the one above. – Damodar Bashyal Mar 29 at 0:15
Or, more simply: find . -iname "._*" -delete – dlo Jun 22 at 21:03

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.