Those Damn .DS_Store Files

If you have connected an external drive to a mac and then back on your linux box, you are familiar with the .DS_Store file.  It is a file that OS X uses for some of the custom settings in the finder.  It’s a bit more complicated than that, but for the sake of this post, that is all that is important.

If you are like me, and do a lot of file manipulation and data moving, those .DS_Store files can be a pain in the ass.  Well, here is a quick command that will delete them.

As root, or a privlidged account, cd to / and run the following command;

find . “-name+ “.DS_Store” -exec rm {} ;

Depending on the size of your filesystem and the processing power of your linux box, this process will complete quickly, or it may take a while.  But in the end, all of the .DS_Store files will be removed.