«

»

Print this Post

Disable and remove .DS_Store files stored on network locations

So today I was going through my Synology NAS and noticed .DS_Store files all over the place.

These are actually files containing extended attributes created by Finder in Mac OS X. But, since they get written out to network locations, they can cause backup and versionining issues.

To disable them from being created on network locations, open a Terminal and run the following

defaults write com.apple.desktopservices DSDontWriteNetworkStores true

(Note: This only affects the currently-logged-in user)

Now in my case, I had these files all over my Synology NAS, so I was able to easily get rid of them by SSHing into the box and running the following:

find / -name .DS_Store -delete

And… done.

Permanent link to this article: http://mikebeach.org/2012/12/13/disable-and-remove-ds_store-files-stored-on-network-locations/

3 comments

  1. Peter Venton

    Tried your suggestion and get a permission denied on the delete.

    I am not a unix expert – I often get an error about a DS_Store file already existing when trying to copy files from one NAS to another. I want to remove all the DS_Store files and prevent further creation.

    I am trying to copy gigabytes of data from an old NAS to a new one and simply cannot do it with the DS_Store files in place. I am the admin on my own machines and still get the permission denied error.

    Its very annoying

    1. Mike

      Are you connected to the NAS as root? Where do you get the permission denied errors?

  2. Chris

    Thank you for this post. Very helpful for OS X user like me who was encountering problems with copying files from Synology NAS.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>