I use OS X Mavericks and have some company storage drives mounted (using smb or cfs).
(smb://[email protected]/directory/data).
When I work with files on the drive or copy files to the drive, some hidden files are created. Most of these files start with dot-dash ._
and then the filename of the original file, like:
._test001.png
._test002.png
._test003.png
And most of the times, the famous ._.DS_Store
and .DS_Store
are also there.
On my Mac, these .
dot items are invisible, but my windows colleagues do see these files. How can I prevent OS X from making these strange invisible files?
On support.apple.com (and other internet sources) you can find a 'defaults write' to disable the creation of .DS_Store files on your network drives. But this does not work in Mavericks:
defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true
For now I use this oneliner, but doing a rm -rf
does feel wrong in this case.
find . -type f -name "._*" -exec rm "{}" \;
Edit: I don't want to delete the files or exclude them from copying. I want them not to be created in the first place.
Edit: I prefer a 'native' OS X solution over third party apps.
Edit: This questions has two answers, one for the ._ files and one for the .DS_Store files. The bounty is rewarded for dot_clean
, this native command line app cleans all ._ files. Unfortunately is does not clear the .DS_Store files, this can effectively be done with Asepsis. Asepsis stores .DS_Stores in a fixed location, and not in the folder itself.