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’
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.
_.DS_store creation on network drives for all users see Apple’s article.