When accessing a remote file server with Finder it normally creates files named .DS_Store in each folder. This includes folders on network drives that may be shared with other people, and other operating systems, such as Windows. This tweak can be used to stop the creation .DS_Store files over network connections.
Start a new Terminal session (in Finder click Applications > Utilities > Terminal).
To enable this setting, type (or copy and paste) the following command:
defaults write com.apple.desktopservices DSDontWriteNetworkStores -boolean true
To reset this setting to the default value, type (or copy and paste) the following command:
defaults delete com.apple.desktopservices DSDontWriteNetworkStores
To activate this tweak please reboot the system.
Close the Terminal session by typing
exit at the prompt.
Disclaimer: Making any changes to your system can cause serious problems that may require you to reinstall your operating system. We cannot guarantee that problems resulting from these modifications can be resolved. Please follow the instructions carefully and use the information provided at your own risk.