Ask Different is a question and answer site for power users of Apple hardware and software. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'd just like to know why if I "tar -czf" a file/directory, osx adds a: ._ for each file? I see these when I untar in linux. Or when I work with the uncompressed project in eclipse as it doesn't like them at all. I use 10.7.5.

share|improve this question
up vote 15 down vote accepted

OS X's tar uses the AppleDouble format to store extended attributes and ACLs. tar and Archive Utility also know how to convert the ._ files back to the native formats, but the ._ files are kept if the archive is extracted on another platform or on a non-HFS volume.

You can usually just tell tar to remove the metadata by setting COPYFILE_DISABLE to some value:

$ xattr -l file.jpg 0002;50d20c48;Tweetbot;
$ tar -cf 1.tar file.jpg 
$ tar -tf 1.tar 
$ COPYFILE_DISABLE=1 tar -cf 2.tar file.jpg 
$ tar -tf 2.tar 

Information stored as extended attributes:

  • Resource forks (since 10.4)
    • Custom icons set in Finder and the images of Icon\r files
    • Metadata in PSD files
    • Script objects stored in scpt files, AppleScript Editor window state
  • Information about aliases
  • Quarantine status, download URLs
  • Spotlight comments
  • Encoding of files saved with TextEdit
  • Caret position of files saved with TextMate
  • Skim notes

You can see ACLs with ls -le:

$ ls -led /Applications/
drwxrwxr-x@ 146 root  admin  4964 Jun 17 22:53 /Applications/
 0: group:everyone deny delete
share|improve this answer
Great advice on COPYFILE_DISABLE, solved my problems with those nasty ._ files. – StasM Dec 28 '12 at 1:03… draws attention to --disable-copyfile – Graham Perrin Feb 7 '15 at 9:15

Those files were always there, but they are invisible in Finder (and most Mac OS applications). See


That is: these files contain the extended file attributes ... ... and they were created as soon as MacOS gave extended attributes to the files. So these ._* files were not created for the tar archive.

share|improve this answer
NO they're weren't always there as it was something I was working with previously on ubuntu. I guess that osx adds them upon exploding the compressed file onto the system. which of course I didn't know until I took a cop back to the platform of origin. What I'd like to know is wh it adds them in the first place – Dark Star1 Dec 26 '12 at 18:56
These files contain the extended file attributes ... – GEdgar Dec 26 '12 at 20:18
Thanks. Can't accept unless you make it an answer – Dark Star1 Dec 26 '12 at 23:20

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.