Apple Event: May 7th at 7 am PT

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Strange ._ files

Hi.

I'm using tar to create a tape archive. I have a list of the to be backupped files in a seperate file and then call:

tar cvf backup.tar -T files.txt

While the backup ran, I saw:


./. IMG0123.JPG
./IMG_0123.JPG
./. IMG0124.JPG
./IMG_0124.JPG


Skwars-MacBook-Pro:DCIM alex$ grep _0124 files.txt
./IMG_0124.JPG

This shows, that in files.txt, there's only "./IMG_0124.JPG".

But why did that "./. IMG0124.JPG" get included?

$ tar tvf backup.tar ' IMG_0124'
-rw-r--r-- alex/staff 53466 2009-07-07 19:13:32 ./. IMG0124.JPG
-rw-r--r-- alex/staff 657838 2009-07-07 19:13:32 ./IMG_0124.JPG

So it indeed got included in the backup.

Why?

Thanks a lot,
Alexander

MacBook Pro, Mac OS X (10.5.7)

Posted on Jul 18, 2009 7:31 AM

Reply
Question marked as Best reply

Posted on Jul 18, 2009 8:24 AM

If a file has extended attributes (use *+ls -l@+* to check), they are put into ._ files.
9 replies

Jul 19, 2009 7:01 AM in response to etresoft

In Bash (Terminal), try: export COPY EXTENDED_ATTRIBUTESDISABLE=true

Another way (as etresoft said) is to just install the current version of GNU tar ( http://www.gnu.org/software/tar/ ). Then you will have both Tar's on your system (GNU will be in /usr/local/bin). You can also use a 3rd party archive program (such as Springy)

Yes, this is Apple's implementation of TAR. Unless you're sending these files to a non-Mac user (i.e. Windows), you should use Apple Tar. Without it, you will lose information, such as icons. (for example, a sparse archive will be viewed in finder as a directory)

See Wikipedia for an explanation of resource forks

Jul 19, 2009 7:01 PM in response to alexs77

Those single quotes may be forcing the shell to interpret the \ and the * as literal characters rather than as an escape character and a globbing character. No, I haven't tried it, but you might try using double quotes (") instead of single quotes ('). And I'm not convinced that an escape backslash belongs there, either. So, you might see if --exclude "._*" does it.

Strange ._ files

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.