Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Whenever I access windows shares from OSX 10.5 it leaves .DS_Store files on the remote filesystem. What are they used for, and are they necessary, and can they be prevented from being created?

share|improve this question
up vote 37 down vote accepted

The ".DS_Store" files are used by the Mac OS Finder to store info about Finder window settings for a folder. They will appear in each folder that you visit (browse to) with the Finder. You normally do not see these files in Finder (they are "hidden", like any *NIX alike dot files)

To prevent the creation of these files, open the Terminal and type:

defaults write DSDontWriteNetworkStores true
share|improve this answer
Note that this only applies to the .DS_Store files on a network share. It will still create .DS_Store files on the local device. – Dave K May 19 '09 at 17:18
I always wondered but never bothered to look it up, awesome! – jtimberman Jun 6 '09 at 6:43

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 preferences file).

share|improve this answer

These files are used by Finder to save the positions of icons, the size of the respective Finder window, the window's background, and other view options.

share|improve this answer

An alternative method to disabling .DS_Store files if you don't have control over the Macs accessing the Windows shares is to disable the ability for these files to even be stored on the share. (Using the veto_files option in smb.conf or File Screen Management on Windows - thankfully it's disabled by default on 10.5+ clients)

You may want to check out another question: File shares for Mac users here on SF for some other associated pointers.

share|improve this answer
Be careful doing this. OS X, or rather the Finder, can choke if it tries to write a file but is vetoed. – Matthew Schinckel May 30 '09 at 1:16

Spotlight also uses the info in the .DS_Store for indexing.

share|improve this answer

As many others have said, these are used by Finder. However if you don't like them you can safely delete them.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.