.TH zip "" "" "Command"
.PC "Zip files into a compressed archive"
\fBzip [\-\fIoptions\^\fB] [\-b \fIpath\^\fB] [\-t \fImmddyy\^\fB] \fIzipfile \fIfile ... \fB[\-x \fIfile ...\^\fB]\fR
.PP
.HS
.SH Options:
.IC "\fB\-b \fIpath\fR"
Use
.I path
for temporary files
.IC \fB\-c\fR
Add one-line comments to the archive
.IC \fB\-d\fR
Delete each "file" from the archive
.IC \fB\-e\fR
Encrypt the file
.IC \fB\-ee\fR
Verify the encryption key
.IC \fB\-f\fR
``Freshen'' the contents of the archive
the archive.
.IC \fB\-g\fR
``Grow'' \(em that is, append files to \(em an existing archive
.IC \fB\-h\fR
Display a help message
.IC \fB\-i\fR
Only implode the files
.IC \fB\-j\fR
``Junk'' (that is, do not record) directory names
.IC \fB\-k\fR
Mimic a PKZIP-made zipfile
.IC \fB\-l\fR
Show the software license
.IC \fB\-m\fR
Delete each file
.IC \fB\-n\fR
Do not compress special suffixes
.IC \fB\-o\fR
Make zipfile as old as latest entry
.IC \fB\-q\fR
Operate quietly
.IC \fB\-r\fR
Operate recursively
.IC \fB\-s\fR
Compress files only
.IC \fB\-t\fR
Manipulate only the files updated since "mmddyy"
.IC \fB\-u\fR
Update only
.IC \fB\-x\fR
Exclude each "file" from those manipulated
.IC \fB\-z\fR
Add a zipfile comment
.IC \fB\-0\fR
Use level-0 compression
.IC \fB\-9\fR
Use level-9 compression
.HE
The command
.B zip
compresses and archives one or more files.
It resembles the program
.B pkzip ,
which is widely used under \*(MD.
.PP
.B zip
recognizes the following command-line options:
.IP "\fB\-b \fIpathname\fR"
Write temporary files into directory
.IR pathname .
.IP \fB\-c\fR
Add one-line comments to the archive.
.IP \fB\-d\fR
Delete each
.I file
from
.IR zipfile .
.IP \fB\-e\fR
Encrypt the zipfile.
.B zip
prompts you for the encryption key.
.IP \fB\-ee\fR
Verify the encryption key.
.IP \fB\-f\fR
``Freshen''
the contents of
.IR zipfile :
replace the files with the files on disk,
but only if the file on disk is newer than that in
.IR zipfile .
.IP \fB\-g\fR
``Grow''
.IR zipfile :
that is, append files onto it.
.IP \fB\-h\fR
Display a help message.
.IP \fB\-i\fR
Only implode the files.
.IP \fB\-j\fR
``Junk'' (that is, do not record) directory names.
.IP \fB\-k\fR
Mimic a PKZIP-made zip file.
.IP \fB\-l\fR
Show the software license.
.IP \fB\-m\fR
Delete each
.I file
from
.IR zipfile .
.IP \fB\-n\fR
Do not compress special suffixes.
.IP \fB\-o\fR
Make
.I zipfile
as old as latest entry.
.IP \fB\-q\fR
Operate quietly.
.IP \fB\-r\fR
Recurse \(em that is, if a
.I file
is a directory,
manipulate its files and those in all of its subdirectories.
.IP \fB\-s\fR
Only compress the files \(em do not archive them.
.IP \fB\-t\fR
Manipulate only the files updated since
.IR mmddyy .
.IP \fB\-u\fR
Update:
manipulate only changed or new files.
.IP \fB\-x\fR
Exclude each
.I file
from those manipulated.
.IP \fB\-z\fR
Add a zipfile comment.
.IP \fB\-0\fR
Use level-0 compression.
This compress faster.
.IP \fB\-9\fR
Use level-9 compression.
This compresses smaller.
.PP
The default action is to add or replace each
.IR file .
The file `\(em' names the standard input.
.SH "See Also"
.Xr "commands," commands
.Xr "compress," compress
.Xr "gunzip," gunzip
.Xr "gzip," gzip
.Xr "unzip" unzip
.SH Notes
Do not confuse this command with
.BR gzip .
