Disable .DS_Store files on network shares
Apple macOS automatically creates a hidden file called _.DS_store
on any file system it encounters, including SMB (Windows) networks, similar to Windows’ desktop.ini
file.
To prevent its creation on network shares, follow these steps on the Apple computer:
Open Terminal (/Applications/Utilities/Terminal or click the magnifying glass in the top right of the screen and type Terminal)
Execute the following command
defaults write com.apple.desktopservices DSDontWriteNetworkStores true
Either restart the computer or log out and back in.
To disable _.DS_store
creation on network drives for all users see Apple’s article.
References
Apple | Mac OS X v10.4 and later: How to prevent .DS_Store file creation over network connections
Tags: