Over a million developers have joined DZone.

Recursively Remove .DS_Store Files In OS X (More Optimized)

DZone's Guide to

Recursively Remove .DS_Store Files In OS X (More Optimized)

Free Resource
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 {} \;'

Opinions expressed by DZone contributors are their own.


Dev Resources & Solutions Straight to Your Inbox

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.


{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}