Cleaning up after your Mac or how to kill ._AppleDouble and .DS_store
I love my Mac but it’s not very “clean” when working on network shares. If you work in a heterogeneous environment and you connect your mac to network shares, people may complain about the Mac leaving what some folks call “mac dust”. Files like .ds_store and files that have ._ prepended to them with otherwise identical file names to actual usable files.
OS X does this and it sucks. During the creation of a file on a non-HFS+ filesystem the mac leaves this garbage. When other macs look at the drive they don’t display these files. When other computers (Windows) look at the drive they see all of this “dust” and it’s confusing because the garbage has the same filename as the real file prepended with “._”.
The .ds_store files are easy to get rid of. Fire up terminal on the mac and enter defaults write com.apple.desktopservices DSDontWriteNetworkStores true
The “resource forks” or _. or _.AppleDouble files are harder to get rid of and were the larger problem for me. I couldn’t find a way to tell the mac to stop this bad behavior. Nothing on the web for a defaults/plist solution like the .ds_store fix. Instead I’m running a cron job on the server to remove these. This is an inelegant solution but it works for me: find /your/directory/path -name ._* -exec rm '{}' ';'
Apple should really fix this if it wants to be accepted by the enterprise.