Tidying tar on MacOS X

One of the annoyances with a default installation of MacOS X is that tar includes dotfiles such as ._text.txt in the archives it creates. The dotfiles store metadata for actual files, but I almost never want them included since I often use tar to create a bundle of files to be sent somewhere. And I keep forgetting where to find the tip for turning this feature off, so I'm writing it down here.

On MacOS X 10.5 Leopard, the COPYFILE_DISABLE environment variable must be set to true, or on the command line:

Story tags: