Name

zip

Synopsis

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 }
pathname...]

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.

Options

-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.

-c

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

-d

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

-D

Disable the creation of ...

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

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.