How do I stop Mac OS X from creating .DS_Store files

Open a Terminal and execute:

$ defaults write com.apple.desktopservices DSDontWriteNetworkStores true

This will turn off writing these files to all network volumes.

Please note: Preventing Mac OS X from creating .DS_Store files can have adverse effects.

Author: admin