All HowTo's Linux Ubuntu, Mint & Debian Linux

Nasty .DS_Store Files Linux

This is a simple one liner to remove all .DS_Store files that maybe sitting on your Linux box. There are many reasons that you might want to do this but the one that prompted me was this output from an OpenVAS report.

MacOS X creates a hidden file, ‘.DS_Store’ in each directory that has been viewed with the ‘Finder’. This file contains a list of the contents of the directory, giving an attacker information on the structure and contents of your website.

find / -name '*DS_Store' -exec rm -f {} ;

Obviously you have to be root for this to work but work it does, if you only want to target the directory that you are in for example replace the / with a full stop .

Leave a Reply

Your email address will not be published. Required fields are marked *