//View Tip #823
Similar Tips
» Finding log files X number of days old and deleteing them.
» MAC Address Spoofing on OS X
» Count files by type
» Checksum directory recursively
» Pipe files to an archive


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