zip [-h | -v]
zip [-q | -v] [-T] [-0 | -1 | -9] [-F[F]] [-o] [-f | -u] [-g] [-b directory]
[-J] archive_filename
zip [-q | -v] [-T] [-0 | -1 | -9] [-r [-D]] [-m] [-t MMDDYY] [-o] [-c] [-z]
[-X] [-j] [-k] [-l[l]] [-y] [-n suffix[:suffix]...] [ -f | -u] [-d] [-g]
[-b directory] [-A] archive_filename { pathname... | -@ } [{ -i | -x }

The files given by the pathname arguments are collected into a single archive file with some metadata (as with tar), where they are compressed using the PKZIP algorithm. The archive file is named with a .zip extension unless another extension is specified. If pathname is given as -, data to be archived and compressed is read from standard input; if archive_filename is -, the ZIP archive data is written to standard output instead of to a file. If archive_filename already exists, then the specified files are added to or updated in the existing archive. When called with no arguments, it prints a usage statement to standard output.

Unlike the creation of ZIP archives from the Finder, zip doesn’t preserve resource or attribute forks.


-b path

When updating an existing archive, specify path as the directory in which the new archive is temporarily stored before being copied over the old. Normally the temporary file is created in the current directory.


Prompt for one-line comments associated with each file in the archive.


Remove files from an existing archive, instead of adding or updating them.


Disable the creation of ...

Get Mac OS X Tiger in a Nutshell now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.