Do you mean the zip
command-line tool or the Finder's Compress command?
For zip
, you can try the --data-fork
option. If that doesn't do it, you might try --no-extra
, although that seems to ignore other file metadata that might be valuable, like uid/gid and file times.
For the Finder's Compress command, I don't believe there are any options to control its behavior. It's for the simple case.
The other tool, and maybe the one that the Finder actually uses under the hood, is ditto
. With the -c -k
options, it creates zip archives. With this tool, you can experiment with --norsrc
, --noextattr
, --noqtn
, --noacl
and/or simply leave off the --sequesterRsrc
option (which, according to the man page, may be responsible for the __MACOSX
subdirectory). Although, perhaps the absence of --sequesterRsrc
simply means to use AppleDouble format, which would create ._ files all over the place instead of one __MACOSX
directory.