Delete those pesky ".DS_Store" files

zsh, 19

rm -f /**/.DS_Store

(Make that 16 if it's ok to leave out -f.)


Bash*, 40 30

find / -name .DS_Store -delete

find / -name .DS_Store -exec rm -f {} \;

This should handle it (not very golfed, not.to.mention marvelously slow). Bash seems right because we don't have to deal with any "import system" nonsense. If you want to require execution in any environment, add 4 chars for bash and 1 for a line feed.

*any shell I guess, just can't get out of the habit assuming the bourne again shell is the only one.


Ruby: 38 33 characters

File.delete *Dir['/**/.DS_Store']