04 December 2017

Prevent apple OS from creating .DS_Store and other bullshits

I don't think I have to explain about that. Everyone that had to admin an ecosystem that have one or more apple users now how this can be a nightmare in different scenarios (specially because at some point, MacOS doesn't care even to hide the files anymore when dealing with network shares, how nice).

Well... this needs to be applied on the MacOS:

Prevent MDS from attempting to Index
sudo touch /Volumes/volume name/.metadata_never_index

Disable Indexing AND Searching of Volumes (if necessary)
sudo mdutil -i off -d /Volumes/volume name

Delete existing Spotlight Index (if necessary, to start over, whatever fits you)
sudo rm -rfv /.Spotlight-V100

Disable creating '.DS_Store' bullshit on USB volumes
defaults write com.apple.desktopservices DSDontWriteUSBStores -bool true

Disable creating '.DS_Store' bullshit on network volumes
defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true

Now that you've cleaned the mess, remove this bullshit from your drives:
find / -name ".DS_Store" -depth -exec rm {} \;

No comments:

Post a Comment