So you've prepared a directory of files you want to transfer to someone else. Being a command-line guru, you decide to use tar. After tarring up the files and extracting them elsewhere, you find that there are mysterious additional files inside the tarball. Every single file has a "ghost twin" named identically except for a ._ (dot underscore) prefix.
For a long explanation, see this Ars Technica article. For the short answer, see below.
On Leopard
prompt> COPYFILE_DISABLE=true tar -czvf YourTarFileName.gz DirectoryToTar/
On Tiger
prompt> COPY_EXTENDED_ATTRIBUTES_DISABLE=true tar -czvf YourTarFileName.gz DirectoryToTar/
Of course, if you always want these features disabled, you could just add this to your ~/.bash_profile file.
# For Tiger export COPY_EXTENDED_ATTRIBUTES_DISABLE=true# For Leopard
export COPYFILE_DISABLE=true

tagged with: 