Never been to DZone Snippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Recursively Remove .DS_Store files in OS X (More optimized) (See related posts)

Recently, I saw a this snippet :
alias rmdsstores='find ./ -type f | grep .DS_Store | xargs rm'

But this one is not very optimized, because you have two pipes with command call.

You can do exactly the same, with only the 'find' command, here the code :
alias rmdsstores='find . -name *.DS_Store -type f -exec rm {} \;'

You need to create an account or log in to post comments to this site.


Click here to browse all 4834 code snippets

Related Posts