DS_store?

makander
Contributor

Hi,

I've come across this a couple of times but I don't understand why some disable the DS_store creation on network shares? Does this give a performance boost?

1 ACCEPTED SOLUTION

thoule
Valued Contributor II

The file is touched each time a Mac user opens a window (as that file saves window position, etc.) Windows users see that file when they browse as it is not invisible to them. And some admins consider that .DS_store files to be messy. Not a performance boot, just more a user experience boost.

View solution in original post

8 REPLIES 8

thoule
Valued Contributor II

The file is touched each time a Mac user opens a window (as that file saves window position, etc.) Windows users see that file when they browse as it is not invisible to them. And some admins consider that .DS_store files to be messy. Not a performance boot, just more a user experience boost.

makander
Contributor

Thank you @thoule!

jacob_salmela
Contributor II
#!/bin/bash
# Remove .DS_Store files
sudo find / -name ".DS_Store" -depth -exec rm {} ;

# Prevent them from being created on network shares
defaults write com.apple.desktopservices DSDontWriteNetworkStores true

Matt
Valued Contributor

+1 for what jacob posted. I was just going to post that script :D

chris_kemp
Contributor III

If you use any generic user names, the .DS_Store file can cause problems with different clients trying to view the same folder. We found that when new files were created by one machine, other machines could not see the new files until we deleted the .DS_Store.

Kevin
Contributor II

Something to keep in mind…
We found that there are several ways to prevent .DS_Store files form being written on server volumes, and they all seem to work fine.
However, we kept finding .DS_Store files on server volumes.

We finally figured out, a lot of people create folders of files on their Desktop and copy them to the server volumes. These solutions do not prevent those files from being copied. So, yes, set the com. apple.desktopservices file to not write .DS_Store files to server volumes, but you will still want to scan volumes and delete the files that get copied out there from time to time to keep them to a minimum.

dpertschi
Valued Contributor

That's kind of interesting about no prevention of copying those invisible files, I'd never considered that.
Kevin, on your windows servers, are you searching for and deleting them on a regular basis then?

I'm beginning to think eliminating and permanently blocking those files from being written might increase the abysmal Finder performance when browsing the remote volumes.

ts85
New Contributor III

How are you deploying that script? I've tried both a configuration profile and by pushing a script to run the defaults write command, the plist in any user directory I check is still set to "defaults write com.apple.desktopservices DSDontWriteNetworkStores true"

Would a killall -user $USER cfprefsd force enable this?