Friday, February 19, 2010

macosx tar - annoying ._* files

I noticed that tar generates files starting with ._* when creating an archive

$ tar cvzf jfa.tgz jfa

And the corresponding listing in archive

ashee-mac:shiva amitava$ tar tvf jfa.tgz
drwxr-xr-x amitava/staff 0 2010-02-19 09:18:22 jfa/
-rw-r--r-- amitava/staff 187 2010-02-19 08:40:06 jfa/._.htaccess
-rw-r--r-- amitava/staff 616 2010-02-19 08:40:06 jfa/.htaccess

Notice how it adds "._.htaccess"

I found the solution here

Here's the command for convenience
$COPYFILE_DISABLE=true tar cvzf jfa.tgz jfa

COPYFILE_DISABLE=true (for Leopard)

No comments: