Nov 12

If you run your Mac in a mixed network environment you’ll surely have noticed .DS_Store files appearing in the shared folders of your Linux or Windows boxes, they’re hidden files used to store custom attributes of a folder such as the position of icons or the choice of a background image.
By default, MacOS X will create a .DS_Store file in every folder it accesses, while this is ok in OS X it may be annoying for network shares. To prevent the creation of .DS_Store files on network volumes execute this from a Terminal:

defaults write com.apple.desktopservices DSDontWriteNetworkStores true

In addition, to easily get rid of all already existing .DS_Store execute from a Terminal:

sudo find / -name '\.DS_Store' -print -delete

Note: In MacOS X 10.5 (Leopard) .DS_Store files are now set invisible for the Windows filesystem so if you don’t run any other OSes you may not need this

2 Responses to “Prevent creation of .DS_Store files in network shares”

  1. What are .DS_Store files and why does OSX leave them on Windows shares? Drija Says:

    [...] They’re OS X Finder metadata. You can disable them in 10.4 for remote filesystems, but 10.5 sets them to hidden on Windows. Regardless, you can disable them as well – but you have to do it for each user (or copy the [...]

  2. What are .DS_Store files and why does OSX leave them on Windows shares? - Just just easy answers Says:

    [...] OS X Finder metadata. You can disable them in 10.4 for remote filesystems, but 10.5 sets them to hidden on Windows. Regardless, you can disable them as well – but you have to do it for each user (or copy the [...]

Leave a Reply

You must be logged in to post a comment.