Damn Mac's dot-underscore (AppleDot) problem

October 19, 2006

So it seems OSX likes to add ._ (dot-underscore or AppleDot) copies of files when transferring files between operating systems. This can get pretty annoying when you see a ._copy of every single file in your tree. Unfortunately, after reading everything I could find on the net it seems there is no way to filter them out properly on the mac side. I tried everything I could think of.

My problem is creating a tarball file (tgz) that needs to be extracted on a linux box. When that file gets extracted there are ._ files scattered all over the place. For example ._.htaccess ._index.html, etc. Very annoying. The only thing I can suggest is when you extract the tar file use the exclude option

tar -xzpvf mytarfile.tgz --exclude="._*"

that will at least untar all the files without putting the ._ files on the filesystem.

Comments

RSS feed for comments on this post.

  1. Ryan Platte says:
    October 20, 2006 @ 20:17 — Reply

    I have never seen this before. .DS_Store, that I've seen, but never ._everything, and I've been using OS X in heterogenous environments almost every day since 10.1. Can you tell us anything more about what you're transferring from and to? Are you using a GUI program to do the transfer?

  2. Jim says:
    October 20, 2006 @ 20:51 — Reply

    hey Ryan, you can find some details out here: http://arstechnica.com/reviews/os/macosx-10.4.ars/7 some more info: When the Finder copies or moves a file, it uses the richest model available, given the formats of the source and destination volumes. The formats that are most significant in these kinds of operations are HFS+ (or HFS) and UFS. These operations particularly affect the representation of the HFS and HFS+ resource fork and the Finder attributes, especially the type and creator codes. As one might expect, the Finder preserves the resource fork and Finder attributes of an HFS+ file "as is" when it copies the file to an HFS+ (or HFS) volume. The more interesting case, however, is when it copies an HFS+ file to a UFS volume. When this happens, the Finder splits out the information that is not in the data fork (particularly the type and creator codes) and writes this information to a hidden file in the same directory location as the copied file. This hidden file has the same name as the UFS file, except that it has a "dot-underscore" prefix. Thus, if you have an HFS+ file named MyMug.jpeg, when you copy it to a UFS volume, there will be a file named ._MyMug.jpeg in the same location. (my emphasis)

  3. David Olinsky says:
    October 23, 2006 @ 13:53 — Reply

    Jimbo, try this from the bash: export COPY_EXTENDED_ATTRIBUTES_DISABLE =true You could also try ftp/scp before you tar the files (since it's the tar itself that creates the resource forks).

  4. Jim says:
    October 25, 2006 @ 19:36 — Reply

    David you're the f'ing man. that seems to have worked :) damn, couldn't find any info about that when I was searching around.

  5. Dan says:
    November 17, 2006 @ 20:50 — Reply

    Awesome. I've been digging all over the internet and through the tar info files for this! Thank you for finding this out and putting it up.

  6. Ken S. says:
    January 10, 2007 @ 20:54 — Reply

    If you want to make it a "permanent" setting, add it to your .bash_profile file in your home directory.

  7. Bryce says:
    April 10, 2007 @ 04:26 — Reply

    Well I found this article about .DS_Store http://docs.info.apple.com/article.html?artnum=301711 But it is a hammer approach, and my real problem is with the dot-underscore files. When I copy a single standalone mp3 file with NO SPECIAL ATTRIBUTES to my USB mp3 player, I get a ._ file as well. This causes the player to choke. How can I control OS X's habit of littering foreign filesystems on a filesystem-by-filesystem basis? And how would that work for removable drives?

  8. Shane Moss says:
    May 3, 2007 @ 15:49 — Reply

    This is known as the Apple Double filesystem. Apple has been using this for years (since the A/UX days). Any time Mac OS X writes forked files to a non-native filesystem (not HFS(+)) it will write in Apple Double. My favorite GUI method of cleaning these files is with a System Preference called Blue Harvest. Here is a way forum on how to prevent it on network volumes.

  9. Gwik says:
    May 11, 2007 @ 20:07 — Reply

    I have a bigger problem, I used to use find . -iname '._*' -exec rm -rf {} \; to get rid of those F***ing files but this doesn't work anymore. Neither can I use --exclude-partern with tar, this doesn't work. I cannot erase those files except manually.

  10. Michael Trier says:
    May 28, 2007 @ 14:00 — Reply

    Damn, I spent 6 hours looking for the answer to this. Thaks David.

  11. Mike Bishop says:
    June 3, 2007 @ 21:37 — Reply

    If you want to remove the files easily run this from terminal: sudo rm */._* -R -v Careful... This will run through every child directory and remove all files with ._ prefixed. Back your s**t up.

  12. Robert Pogorzelski says:
    August 30, 2009 @ 09:02 — Reply

    This may be helpful if anyone's looking for a radical solution: http://robertpogorzelski.com/blog/2009/08/30/getting-rid-of-mac-osx-crap-in-tarballs/

  13. 上海SEO says:
    November 3, 2009 @ 01:15 — Reply

    If you want to remove the files easily run this from terminal: sudo rm

  14. judebert says:
    November 18, 2009 @ 11:14 — Reply

    I'm having similar trouble while creating a tarball. The environment variable didn't help. Apparently it's changed on Leopard; there, use COPYFILE_DISABLE=true instead.

  15. wholesale watches says:
    November 20, 2009 @ 05:15 — Reply

    Comment pending moderation

  16. HoneyReplica says:
    November 26, 2009 @ 02:35 — Reply

    Comment pending moderation

  17. metin2 yang says:
    December 26, 2009 @ 07:59 — Reply

    Comment pending moderation

  18. petty says:
    December 28, 2009 @ 01:25 — Reply

    Comment pending moderation

  19. ling says:
    January 14, 2010 @ 01:54 — Reply

    Comment pending moderation

  20. ling says:
    January 14, 2010 @ 01:55 — Reply

    Comment pending moderation

  21. replica handbags says:
    January 30, 2010 @ 05:34 — Reply

    Comment pending moderation

  22. RkaneKnight says:
    February 3, 2010 @ 14:43 — Reply

    Comment pending moderation

  23. personalized custom giftss says:
    February 11, 2010 @ 17:52 — Reply

    Comment pending moderation

  24. personalized custom giftss says:
    February 11, 2010 @ 17:53 — Reply

    Comment pending moderation

  25. xiahongjuan says:
    March 15, 2010 @ 04:08 — Reply

    Comment pending moderation

  26. affiliate says:
    March 23, 2010 @ 07:27 — Reply

    Comment pending moderation

  27. watches says:
    March 24, 2010 @ 07:09 — Reply

    Comment pending moderation

  28. watches says:
    March 24, 2010 @ 07:11 — Reply

    Comment pending moderation

  29. tag heuer says:
    April 1, 2010 @ 02:12 — Reply

    Comment pending moderation

  30. rolex-replica says:
    April 2, 2010 @ 04:50 — Reply

    Comment pending moderation

  31. tag heuer replica says:
    April 2, 2010 @ 05:11 — Reply

    Comment pending moderation

  32. christian louboutin shoes says:
    April 6, 2010 @ 03:45 — Reply

    Comment pending moderation

  33. nike kicks says:
    April 14, 2010 @ 03:59 — Reply

    Comment pending moderation

  34. Links of London Jewellery says:
    April 14, 2010 @ 06:37 — Reply

    Comment pending moderation

  35. blu ray ripper says:
    April 18, 2010 @ 11:47 — Reply

    Comment pending moderation

  36. onitsuka tiger mexico 66 says:
    April 19, 2010 @ 02:52 — Reply

    Comment pending moderation

  37. ly123 says:
    April 20, 2010 @ 05:51 — Reply

    Comment pending moderation

  38. nike jordan 2010 says:
    April 20, 2010 @ 07:35 — Reply

    Comment pending moderation

  39. logo design says:
    April 21, 2010 @ 07:30 — Reply

    Comment pending moderation

  40. lovejiaocuixia says:
    April 22, 2010 @ 02:16 — Reply

    Comment pending moderation

  41. czx says:
    April 23, 2010 @ 02:22 — Reply

    Comment pending moderation

  42. xue says:
    April 23, 2010 @ 06:59 — Reply

    Comment pending moderation

  43. replica handbags says:
    April 24, 2010 @ 09:30 — Reply

    Comment pending moderation

  44. xue says:
    April 27, 2010 @ 05:56 — Reply

    Comment pending moderation

  45. nike kicks says:
    April 30, 2010 @ 07:27 — Reply

    Comment pending moderation

  46. wow gold says:
    May 4, 2010 @ 05:41 — Reply

    Comment pending moderation

  47. replica watches says:
    May 7, 2010 @ 00:44 — Reply

    Comment pending moderation

  48. replica watches says:
    May 7, 2010 @ 00:45 — Reply

    Comment pending moderation

  49. cara meninggikan badan says:
    May 8, 2010 @ 04:53 — Reply

    Comment pending moderation

  50. hy says:
    May 8, 2010 @ 05:48 — Reply

    Comment pending moderation

  51. sudoko.com says:
    May 12, 2010 @ 23:05 — Reply

    Comment pending moderation

  52. AIR JORDAN I says:
    May 13, 2010 @ 03:33 — Reply

    Comment pending moderation

  53. air jordan i says:
    May 13, 2010 @ 03:44 — Reply

    Comment pending moderation

  54. Retial Market Analyst says:
    May 13, 2010 @ 13:41 — Reply

    Comment pending moderation

  55. student loan debt consolidation says:
    May 14, 2010 @ 06:33 — Reply

    Comment pending moderation

  56. chase personal loans says:
    May 15, 2010 @ 03:01 — Reply

    Comment pending moderation

  57. jacke says:
    May 19, 2010 @ 03:46 — Reply

    Comment pending moderation

  58. 642-067 says:
    May 19, 2010 @ 07:14 — Reply

    Comment pending moderation

  59. replica watches says:
    May 21, 2010 @ 04:49 — Reply

    Comment pending moderation

  60. download get him to the greek says:
    May 21, 2010 @ 11:48 — Reply

    Comment pending moderation

  61. download sex and the city 2 says:
    May 21, 2010 @ 11:50 — Reply

    Comment pending moderation

  62. Cheetah Print says:
    May 21, 2010 @ 15:49 — Reply

    Comment pending moderation

  63. Whelen says:
    May 31, 2010 @ 11:47 — Reply

    Comment pending moderation

  64. xiaocao says:
    June 1, 2010 @ 07:56 — Reply

    Comment pending moderation

  65. guccihandbags says:
    June 1, 2010 @ 07:59 — Reply

    Comment pending moderation

  66. soduko.com says:
    June 2, 2010 @ 00:04 — Reply

    Comment pending moderation

  67. slina says:
    June 3, 2010 @ 02:59 — Reply

    Comment pending moderation

  68. watch mobile phone says:
    June 3, 2010 @ 09:16 — Reply

    Comment pending moderation

  69. replica watches says:
    June 22, 2010 @ 09:45 — Reply

    Comment pending moderation

  70. hummingbird feeders says:
    June 3, 2010 @ 15:33 — Reply

    Comment pending moderation

  71. burberry bags says:
    June 24, 2010 @ 01:34 — Reply

    Comment pending moderation

  72. cheap ed hardy clothing says:
    June 4, 2010 @ 03:13 — Reply

    Comment pending moderation

  73. replicas watches says:
    June 25, 2010 @ 03:12 — Reply

    Comment pending moderation

  74. wangrongjiao says:
    June 4, 2010 @ 06:48 — Reply

    Comment pending moderation

  75. wangrongjiao says:
    June 4, 2010 @ 06:50 — Reply

    Comment pending moderation

  76. replica watches says:
    June 21, 2010 @ 10:10 — Reply

    Comment pending moderation

  77. Meiru says:
    June 4, 2010 @ 07:57 — Reply

    Comment pending moderation

  78. louis vuitton handbags says:
    June 25, 2010 @ 02:24 — Reply

    Comment pending moderation

  79. Water proof jacket says:
    June 4, 2010 @ 23:56 — Reply

    Comment pending moderation

  80. replicas watches says:
    June 22, 2010 @ 07:29 — Reply

    Comment pending moderation

  81. virbram five fingers says:
    June 5, 2010 @ 04:00 — Reply

    Comment pending moderation

  82. burberry bags says:
    June 22, 2010 @ 09:42 — Reply

    Comment pending moderation

  83. Christian Louboutin 2010 says:
    June 5, 2010 @ 09:56 — Reply

    Comment pending moderation

  84. replicas watches says:
    June 22, 2010 @ 07:22 — Reply

    Comment pending moderation

  85. Business Logo Design says:
    June 5, 2010 @ 23:29 — Reply

    Comment pending moderation

  86. Replica Jewelry says:
    June 24, 2010 @ 07:34 — Reply

    Comment pending moderation

  87. Mlio says:
    June 7, 2010 @ 11:59 — Reply

    Comment pending moderation

  88. Billig Berufsunfähigkeitversicherung says:
    June 7, 2010 @ 12:02 — Reply

    Comment pending moderation

  89. adjustable beds says:
    June 8, 2010 @ 06:42 — Reply

    Comment pending moderation

  90. Insanity Workout says:
    June 9, 2010 @ 05:04 — Reply

    Comment pending moderation

  91. Sam Pierce says:
    June 9, 2010 @ 10:18 — Reply

    Comment pending moderation

  92. Mark Spencer says:
    June 9, 2010 @ 10:23 — Reply

    Comment pending moderation

  93. LOuIs VuItToN Damier Graphite Canvas says:
    June 10, 2010 @ 04:07 — Reply

    Comment pending moderation

  94. LOuIs VuItToN Damier Graphite Canvas says:
    June 10, 2010 @ 04:30 — Reply

    Comment pending moderation

  95. LOuIs VuItToN Damier Graphite Canvas says:
    June 10, 2010 @ 05:03 — Reply

    Comment pending moderation

  96. christian louboutin on sale says:
    June 11, 2010 @ 09:40 — Reply

    Comment pending moderation

  97. UGG sale says:
    June 12, 2010 @ 00:53 — Reply

    Comment pending moderation

  98. Chi Hair Straightener says:
    June 12, 2010 @ 00:56 — Reply

    Comment pending moderation

  99. Fitness says:
    June 12, 2010 @ 00:58 — Reply

    Comment pending moderation

  100. CT0-101 says:
    June 12, 2010 @ 09:02 — Reply

    Comment pending moderation

  101. discount nike shoes says:
    June 13, 2010 @ 09:40 — Reply

    Comment pending moderation

  102. hardy t shirts says:
    June 14, 2010 @ 07:20 — Reply

    Comment pending moderation

  103. vibram five finger shoes says:
    June 14, 2010 @ 07:34 — Reply

    Comment pending moderation

  104. jordan 1 shoes says:
    June 14, 2010 @ 21:18 — Reply

    Comment pending moderation

  105. radii shoes says:
    June 15, 2010 @ 07:34 — Reply

    Comment pending moderation

  106. nike dunks says:
    June 15, 2010 @ 07:35 — Reply

    Comment pending moderation

  107. asics shoes says:
    June 15, 2010 @ 07:37 — Reply

    Comment pending moderation

  108. Louis Vuitton handbags says:
    June 16, 2010 @ 08:20 — Reply

    Comment pending moderation

  109. Hair Loss Products For Men says:
    June 17, 2010 @ 09:00 — Reply

    Comment pending moderation

  110. Juicy Couture says:
    June 18, 2010 @ 12:30 — Reply

    Comment pending moderation

  111. Amish Country Furniture PA says:
    June 18, 2010 @ 14:21 — Reply

    Comment pending moderation

  112. Jhon Frank says:
    June 18, 2010 @ 22:02 — Reply

    Comment pending moderation

  113. Jhon Frank says:
    June 18, 2010 @ 22:10 — Reply

    Comment pending moderation

  114. lv bags says:
    June 19, 2010 @ 06:35 — Reply

    Comment pending moderation

  115. wedding dress says:
    June 21, 2010 @ 02:37 — Reply

    Comment pending moderation

  116. jewellery earrings says:
    June 21, 2010 @ 07:13 — Reply

    Comment pending moderation

  117. trend maker says:
    June 21, 2010 @ 08:58 — Reply

    Comment pending moderation

  118. replica watches says:
    June 21, 2010 @ 10:12 — Reply

    Comment pending moderation

  119. replicas watches says:
    June 22, 2010 @ 07:30 — Reply

    Comment pending moderation

  120. ed hardy clothing says:
    June 24, 2010 @ 09:47 — Reply

    Comment pending moderation

  121. louis vuitton handbags says:
    June 25, 2010 @ 02:27 — Reply

    Comment pending moderation

  122. SH2D76Ytik says:
    June 25, 2010 @ 03:24 — Reply

    Comment pending moderation

  123. vibram five finger says:
    June 25, 2010 @ 14:37 — Reply

    Comment pending moderation

  124. Coach handbag outlet says:
    June 27, 2010 @ 22:45 — Reply

    Comment pending moderation

  125. Coach handbag outlet says:
    June 27, 2010 @ 22:46 — Reply

    Comment pending moderation

Leave a Comment

Line and paragraph breaks automatic, HTML allowed: <a href="" title="" rel=""> <abbr title=""> <acronym title=""> <b> <code> <em> <i> <strike> <strong>

Comments disabled due to spammers being losers that lead sad lives.