Tigers and tar pits
One other change in Mac OS X 10.4 that I haven't seen mentioned
anywhere. I use the
tar command to upload files to my
website. And since my upgrade to Tiger I started seeing something
odd. When I created a tarfile containing image, specifically the
album covers for
my iTunes blog, I'd see an extra dotfile
along with the JPEG image:
./._Spamalot.jpeg
./Spamalot.jpeg
After extracting the contents tarfile on my FreeBSD-based web server, I
ran the file command on the extra file:
$ file ._Spamalot.jpeg
._Spamalot.jpeg: AppleDouble encoded Macintosh file
Interesting. Apparently, Apple changed the behavior of
tar and, from what I can determine, a few other commands,
to preserve the metadata that Mac filesystems store in a
file's resource fork. The AppleDouble file format stores both a
file's contents and that extra information. Extracting the tarfile on
a Mac recreates both the data and the metadata, while on another
operating system it generates two separate files.
Not a problem once I know what's going on; I just had to set up a script to delete these unnecessary files on my web server. Sure wish they'd provide a way to turn this behavior off when I know I don't want the metadata. And I sure wish they'd found a place to document this kind of thing. Preferably a place I could have found.
Category: aapl | 2 comments | link