May 2008 Archives

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

Who's this guy?

Aaron Longwell is Chief Web Craftsman at New Media Logic Corporation in Coeur d' Alene, Idaho. As a professional software developer for 12 years and a student of public policy, he occasionally has interesting things to say about software, technology, culture and politics.

Subscribe to feed Subscribe to my RSS Feed

  • View Aaron Longwell's profile on LinkedIn
  • Recommend Me