[Network Administration]: No Littering!

I’m beginning to get annoyed about all of the hidden/system files and directories that have begun to litter through my NFS server. In particular, there are two.

The first is the .DS_Store files. These come from OS X Finder and are written every time a directory is accessed. I find them all over my NFS directories on my NAS. Apple has a KB note about how to turn these off over network connections. You can actually go one step further and disable the file creation globally.

defaults write /Library/Preferences/com.apple.desktopservices DSDontWriteNetworkStores true

This will write the plist for the system wide preferences.

I’ve also seen a post that this should also work on USB or local drives with the key DSDontWriteUSBStores and DSDontWriteLocalStores. I haven’t tried any of this though — just a warning.

The other directories that litter my NAS are the @eaDir directories. These are created on my Synology DS212 NAS. There is a post that details how to prevent the creation of these directories. Basically, these are created by a bunch of indexing daemons.

To find all of the files on the command line you can use:
find . -name .DS_Store -type f to search down from the current directory and optionally remove it with the pipe | xargs rm -rf
or
find . -name @eadir -type d

Advertisements

One thought on “[Network Administration]: No Littering!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s