//View Tip #823
Similar Tips
» Find and remove core files
» Count files by type
» Find files by mime-type
» Remove every file but one
» Moved Trac and Subversion repositories to another machine/direct


Latest tips by RSS
Click here to subscribe
Follow Shell-Fu on Twitter
Click here to follow
Follow Shell-Fu on identi.ca
Click here to follow
.DS_Store files are a hidden file created by OS X to store custom attributes of a folder such as the position of icons or the choice of a background image. By default, they are created in every folder accessed, even folders on remote systems (for example, folders shared over an SMB or AFP connection). This can soon leave your shared folders littered with these files.

The command below will remove all DS_Store files from the current directory and any sub directories.

find -type f -name .DS_Store -exec rm {} \;

View Comments »


Add your comment

Comments are currently disabled
Better use this:

find -type f -name .DS_Store -delete

because it doesn't spawn rm for every file found
Posted 2009-07-31 09:35:00

Home Latest Browse Top 25 Random Hall Of Fame Contact Submit