Goodbye lousy files beginning with a dot, that keep littering my tar archives!

Apple likes to take things and do them their own way. Sometimes that’s good, sometimes not so good.

One particularly annoying example is the fact that Apple for some reason thinks it’s important to send along file metadata when creating archives designated for file systems that cannot handle this metadata. Or in plain English: Whenever you create a tar archive in OS X, it will be full of hidden files, beginning with a dot, that contains metadata about the files in the tar archive. This might be good if you unpack the files in OS X, where the metadata could automatically be restored with the files. But if you, which is very likely if you use tar in the first place, intend to unpack the archive in another unix-ish environment you will have no use of the dot files, they will only be an annoyance.

Fortunately this could all be avoided, by telling OS X that you have no interest in the metadata. This could be done by simply setting an environmental variable. To do this, issue this command in a Terminal window:

export COPYFILE_DISABLE=true

Say your words