Tuesday, December 20, 2016

remove and disable .DS_Store in mounted disk

Do you see this when you want to extend your path by typing the TAB key? What are those .DS_Store files?

They are generated by MacOS (see [1] for detail). Because I mount my remote disk via SMB, MacOS Finder will generate such a configure file whenever you open the mounted folder in Finder locally.

It's harmless to remove those files [2].

How to remove those already in your folder? [3]
cd FOLDER_YOU_WANT_TO_CLEAN_DS_STORE
find ./ -name ".DS_Store" -depth -exec rm {} \;


How to stop generating .DS_Store file on Network drive? [4]
defaults write com.apple.desktopservices DSDontWriteNetworkStores -boolean true

References:
  1. https://en.wikipedia.org/wiki/.DS_Store
  2. http://apple.stackexchange.com/questions/69467/consequences-of-deleting-ds-store
  3. https://helpx.adobe.com/dreamweaver/kb/remove-ds-store-files-mac.html
  4. https://software.com/mac/tweaks/disable-ds-store-files-on-network-drives

1 comment: