… can I tell it not to create these files?
The proposed cron job
As your file server serves multiple users, the short answer is:
- you should allow and not schedule removal of
._
files.
For a file service that is without support for things such as extended attributes:
File service
If you configure the server to prevent creation of ._
files:
- the server will be incompatible with Finder and other apps that are commonly used on OS X.
If you allow creation but schedule removal:
- corruption or dataloss may affect the native file.
Visualise: scheduled deletion of a dot underbar file, whilst that file is present in relation to a copy in progress, or a save in progress. Visualise a rug, pulled from beneath the feet of an operation. It's difficult for me to say exactly what corruption or loss may occur (effects may vary, depending on the timing of the rug-pulling) but I have seen ill effects often enough to caution against scheduled removal of dot underbar files.
Recommended reading
Re: Dot files – a 2006 post by Matt Deatherage, formerly an engineer at Apple. This is highly recommended, for convenience I made annotations.
More obscurely, a table linked from the following question: With WebDAV provided by Microsoft SharePoint, how can users of OS X minimise risks of corruption and multiuser overwrites? – "… some parts … may be generalised …". Within that table are some of the workarounds to which people might resort when faced with a service that prevents dot underbar files. Without going into detail (only much could be squeezed into that table): test results were very thought-provoking.
Clients of the file service
For commonplace tasks such as copying or moving, ._
is required by Finder. That requirement is non-configurable.
For commonplace tasks such as saving, ._
is required by Microsoft Office Excel, PowerPoint and Word 2011 (Service Pack 2). That requirement is non-configurable.
And so on …
Client OS
Use of a client computer running something other than OS X may leave an AppleDouble file dissociated from its corresponding native file. In some use cases the dissociation may be viewed as corruption.
Perceived effects of corruption and of dissociation
From test results in a variety of environments, I should say:
- when a native file is corrupt or lost, the effect is always severe
- when dissociation occurs, the effect is usually harmless (without attributes, the native file remains usable).
dot_clean
dot_clean(1) OS X Manual Page
When used with file systems such as HFS Plus and ZFS:
dot_clean
behaves as expected
- mergers succeed without loss.
Beware of running this command on file systems that are without support for information that may be stored in AppleDouble files. Example:
- when the command deletes
._
files from a DOS_FAT_32
volume, information is lost (not merged)
- I'll report the bug to Apple.