Random Technical Note


The tar program, starting in Mac OS X 10.4, recognizes and handles resource forks and attributes.”

Examining the unsaid, it turns out that Apple’s Unixy command-line tools like tar, gzip and all of their friends don’t work properly on 10.3 and earlier. “Don’t work” here means “don’t include resource forks”, which means significant breakage.

So if you, and by “you” I mean “me”, should suddenly find out that all these Mac apps you’ve been deploying across your highly heterogeneous enterprise are showing up on people’s desktops as anonymous Unix applications, rather than Mac apps with Mac icons, and just generally not working at all for anyone even though the whole thing worked fine in the lab, dammit, that’s what’s going on.

Now you know!


  1. Amos
    Posted September 19, 2006 at 11:27 am | Permalink

    Hey Mike. I might point out that modifying those tools probably took some buy-in from the original developers since the non-mac versions need to know what to do with said resource forks.

    That is a pain, but if you’re going to keep up this Mac admin thing, I suggest you have a peek at Package Maker (and Remote Desktop) for the cadillac experience. Or at a minimum, use a ZIP or DMG file.

    link 1

    link 2

    link 3

  2. Mike Hoye
    Posted September 19, 2006 at 1:00 pm | Permalink

    Oh, I’m not blaming the developers for this, I’m just saying.

    Another thing I’m saying is that using ZIP files produces the same results deploying across OS versions. PackageMaker is is!

  3. Amos
    Posted September 19, 2006 at 4:26 pm | Permalink

    Yeah. Pretty annoying. Mac’s have traditionally relied on .sit and .hqx files. Then more recently the standard has been (optionally GZipped or Zipped) .dmg files. I’m surprised to hear that Panther’s zip can’t handle resource forks… since I *think* that’s when the Archive option was added in finder menus. In Tiger, Apple even stopped bundling Stuffit Expander with the OS.

    Anyway… having lived through Jaguar, Panther, and now Tiger, i’m inclined to think that Apple started out being a bit sceptical of how much people would use OS X’s unixy side – or maybe they were just out of time. Each release has brought great improvements in OS X’s command line utilities.

    Anyway… Package Maker is cool.. but can be overkill, especially if your app already comes in a DMG. If you want a simple scriptable solution, have a look at the hdiutil man page for creating/mounting disk images and this Q and A with an example.