[X-Unix] zip from command-line in Tiger

Joao Carlos de Pinho jogme at terra.com.br
Fri Jun 24 12:27:49 PDT 2005


Em 6/24/05 12:52, "Stephen Jonke" <sjj_public at mac.com> escreveu:

> I thought that command-line tools in Tiger were suppose to be Mac/
> resource-fork-savvy? Is the zip command not included in this, or am I
> missing something? When I zip an applescript application at the
> command-line and then unzip it, I end up with what the Finder thinks
> is a "classic application", which I presume indicates that the
> resource fork was not preserved.


AFAIK, the ZIP format doesn't preserve resource forks.

The compressed files created by the "Create Archive of" command in the
Finder (which preserve the resource forks) are obtained via the "ditto"
command line:

/usr/bin/ditto -c -k -rsrc file_to_compress compressed_filename.zip

The flags above mean:
-c -> create an archive at the destination path
-k -> use PKZIP compression format
-rsrc -> preserve resource data

See ditto manpage for extra options and details.



Regards,

Joao Carlos de Pinho
Sao Paulo, Brazil




More information about the X-Unix mailing list