Remove .DS_Store (and other resource files)

Mac OS X creates .DS_Store files all over hard drives and USB drives. These files store Finder view settings on OS X but are useless in Linux or any other system. Windows does the same with desktop.ini.

To remove them, use this command:

sudo find /media/yourDriveName/ -depth -name ".DS_Store" -exec rm -v {} \;
or replace /media/yourDriveName/ with / to clean up hard disk

Or replace ".DS_Store" with "desktop.ini" or any other name you want to get rid of unwanted files.


back to main page