Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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...) ?

share|improve this question
1  
Please provide more information. They aren't usually created on HFS+. –  Daniel Beck Jul 4 '11 at 13:30
add comment

5 Answers

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 command:

dot_clean --keep=dotbar /Volumes/mounted_smb_volume

where 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 launchd entry.

share|improve this answer
add comment

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 cp -X.

share|improve this answer
add comment

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.
share|improve this answer
1  
Doesn't seem to work for .AppleDouble files. –  Adam Lindberg Jul 13 '12 at 14:26
2  
This definitely only applies to .DS_Store and not to .AppleDouble. –  Asher Dec 26 '12 at 18:22
add comment

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:

cp -X
share|improve this answer
2  
This is not a general solution. –  Adam Lindberg Jul 13 '12 at 14:26
    
To clarify why this is not a general solution, this only applies when manually copying files from the command line. This is unlikely to have any relation to the problem, as .AppleDouble files are created any time a file is accessed on a non-HFS+ volume. Even if you could copy without the resource fork, that only addresses a special case and not the general issue of wanting no .AppleDouble files. –  Asher Dec 26 '12 at 18:23
add comment

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.

share|improve this answer
2  
My reason is that these .AppleDouble folders in directories on my NAS prevent my Windows machines from deleting those directories. Having to log into the NAS and use the web based file browser is really annoying. –  Simon Gill Jan 20 '13 at 4:58
    
I've down voted this because I believe it contains some misinformation. Apparently no non HFS+ File-systems can store metadata? This is incorrect, NTFS does support file metadata, its just that Apple does not interact with it correctly and instead creates a basic file. –  leinad13 Sep 25 '13 at 14:50
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.