Is there a way to disable the creation of .AppleDouble files in Mac OS X (Snow Leopard) on non-HFS filesystems (such as SMB or NFS network shares etc...) ?
Given that Macs support multiple forks to files, the AppleDouble trick (
._ files) try to preserve the data in those forks. So they are needed so that Mac OS X can perform operations on them.
However, most of the files are created when the same volume is mounted through AFP, not SMB/CIFS or NFS. In that case, the AFP server might have configuration options for dealing with the Apple Double files (see, for instance, this blog post).
In order to get rid of AppleDouble files, you can on a Mac the
dot_clean --keep=dotbar /Volumes/mounted_smb_volume
mounted_smb_volume would be the name of the mounted volume.
You could add it to a
crontab entry, or better yet, use something like Lingon X to create a
http://support.apple.com/kb/HT1629 tells me that this can be done via
To configure a Mac OS X user account so that .DS_Store files are not created when interacting with a remote file server using the Finder, follow the steps below:
Note: This will affect the user's interactions with SMB/CIFS, AFP, NFS, and WebDAV servers.
Open Terminal. Execute this command: defaults write com.apple.desktopservices DSDontWriteNetworkStores true Either restart the computer or log out and back in to the user account.
AppleDouble files (the ones named ._filename) are created when you copy a file containing a resource fork to a non-HFS file system.
Sometimes (but not always) the resource you can manage without the resource fork data - for example copying an mp3 file.
You can suppress the resource fork copying if you use a shell (not finder) by using:
You can use BlueHarvest to automatically delete AppleDouble files or other files created by OS X:
You can use
find . -name ._\* -delete to delete
._ files recursively under the current directory.
dot_clean -m . also has the same effect.
The files that start with
._ are used to store metadata like extended attributes and ACLs. Extended attributes include resource forks (
com.apple.ResourceFork) and file flags (
com.apple.FinderInfo). You can see extended attributes with
xattr -l or ACLs with
ls -le. You can use
xattr -c to clear all extended attributes or
chmod -N to delete ACLs, and you can copy files without extended attributes with
There is a tool called "dsweeper" available here: https://github.com/simsalabim/dsweeper It solves the problem (once installed) with a simple
$ dsweeper -d -p /Path/to/volume/
From the website:
A tool that doesn't let AppleDouble ._whatever files into folder that is kept on external HDD. Helps keeping Dropbox clean.
Via homebrew, the installation is remarkably simple:
$ brew install npm
$ npm install dsweeper -g
Solved the problem for me like a charm.
I think part of the question is: why do you want to eliminate .AppleDouble files?
.AppleDouble files are created to store additional file resources (meta-data, etc.). HFS+ filesystems (designed by Apple) have native means to address the storage of this information. Non-HFS+ filesystems (NTFS, EXT3/4, etc.) served over filesharing (Netatalk, SMB, etc.) require some way to store this information. This is achieved by creating additional files on the filesystem, since the filesystem does not have native means for storing the information.
Unlike .DS_Store files (which, as I understand, store desktop details such as icon location, etc.), .AppleDouble files actually store potentially relevant information. This means that you can probably delete the .AppleDouble files and the OS won't complain, but you may well lose meta-data if any is associated with the file. This also includes meta-data created by/for Spotlight, such as when iTunes plays a file. Deleting this information is unlikely to hurt anything, but it is being created/stored for you so that the OS can optimize search and other terms.
So my conclusion is that you probably don't actually want to delete .AppleDouble. But perhaps the details can be filled in? I arrived at this thread attempting to help my Dad with two ReadyNAS; he wanted to eliminate the files because their existence was inexplicable and causing strange behavior with the ReadyNAS backup program (which seems to be solved by using rsync). Please let me know if there are further details not addressed in my conclusions here.