Move the specified files into the zip archive; actually, this
deletes the target directories/files after making the specified
zip archive. If a directory becomes empty after removal of the
files, the directory is also removed. No deletions are done until
zip has created the archive without error. This is useful for
conserving disk space, but is potentially dangerous so it is rec‐
ommended to use it in combination with -T to test the archive be‐
fore removing all input files.
-MM
--must‐match
All input patterns must match at least one file and all input
files found must be readable. Normally when an input pattern
does not match a file the "name not matched" warning is issued
and when an input file has been found but later is missing or not
readable a missing or not readable warning is issued. In either
case zip continues creating the archive, with missing or unread‐
able new files being skipped and files already in the archive re‐
maining unchanged. After the archive is created, if any files
were not readable zip returns the OPEN error code (18 on most
systems) instead of the normal success return (0 on most sys‐
tems). With -MM set, zip exits as soon as an input pattern is
not matched (whenever the "name not matched" warning would be is‐
sued) or when an input file is not readable. In either case zip
exits with an OPEN error and no archive is created.
This option is useful when a known list of files is to be zipped
so any missing or unreadable files will result in an error. It
is less useful when used with wildcards, but zip will still exit
with an error if any input pattern doesn’t match at least one
file and if any matched files are unreadable. If you want to
create the archive anyway and only need to know if files were
skipped, don’t use -MM and just check the return code. Also -lf
could be useful.
-n suffixes
--suffixes suffixes
Do not attempt to compress files named with the given suffixes.
Such files are simply stored (0% compression) in the output zip
file, so that zip doesn’t waste its time trying to compress them.
The suffixes are separated by either colons or semicolons. For
example:
zip ‐rn .Z:.zip:.tiff:.gif:.snd foo foo
will copy everything from foo into foo.zip, but will store any
files that end in .Z, .zip, .tiff, .gif, or .snd without trying
to compress them (image and sound files often have their own spe‐
cialized compression methods). By default, zip does not compress
files with extensions in the list .Z:.zip:.zoo:.arc:.lzh:.arj.
Such files are stored directly in the output archive. The envi‐
ronment variable ZIPOPT can be used to change the default op‐
tions. For example under Unix with csh:
setenv ZIPOPT "‐n .gif:.zip"
To attempt compression on all files, use:
zip ‐n : foo
The maximum compression option -9 also attempts compression on
all files regardless of extension.
On Acorn RISC OS systems the suffixes are actually filetypes (3
hex digit format). By default, zip does not compress files with
filetypes in the list DDC:D96:68E (i.e. Archives, CFS files and
PackDir files).
-nw
--no‐wild
Do not perform internal