This version of zip has updated command line pro‐
cessing and support for long options.
Short options take the form
‐s[‐][s[‐]...][value][=value][ value]
where s is a one or two character short option. A short option that
takes a value is last in an argument and anything after it is taken as
the value. If the option can be negated and "‐" immediately follows the
option, the option is negated. Short options can also be given as sepa‐
rate arguments
‐s[‐][value][=value][ value] ‐s[‐][value][=value][ value] ...
Short options in general take values either as part of the same argument
or as the following argument. An optional = is also supported. So
‐ttmmddyyyy
and
‐tt=mmddyyyy
and
‐tt mmddyyyy
all work. The -x and -i options accept lists of values and use a
slightly different format described below. See the -x and -i options.
Long options take the form
‐‐longoption[‐][=value][ value]
where the option starts with ‐‐, has a multicharacter name, can include
a trailing dash to negate the option (if the option supports it), and
can have a value (option argument) specified by preceding it with = (no
spaces). Values can also follow the argument. So
‐‐before‐date=mmddyyyy
and
‐‐before‐date mmddyyyy
both work.
Long option names can be shortened to the shortest unique abbreviation.
See the option descriptions below for which support long options. To
avoid confusion, avoid abbreviating a negatable option with an embedded
dash ("‐") at the dash if you plan to negate it (the parser would con‐
sider a trailing dash, such as for the option --some-option using
--some- as the option, as part of the name rather than a negating dash).
This may be changed to force the last dash in --some- to be negating in
the future.
OPTIONS
-a
--ascii
[Systems using EBCDIC] Translate file to ASCII format.
-A
--adjust‐sfx
Adjust self‐extracting executable archive. A self‐extracting ex‐
ecutable archive is created by prepending the SFX stub to an ex‐
isting archive. The -A option tells zip to adjust the entry off‐
sets stored in the archive to take into account this "preamble"
data.
Note: self‐extracting archives for the Amiga are a special case. At
present, only the Amiga port of zip is capable of adjusting or updating
these without corrupting them. ‐J can be used to remove the SFX stub if
other updates need to be made.
-AC
--archive‐clear
[WIN32] Once archive is created (and tested if -T is used, which
is recommended), clear the archive bits of files processed.
WARNING: Once the bits are cleared they are cleared. You may
want to use the -sf show files option to store the list of files
processed in case the archive operation must be repeated. Also
consider using the -MM must match option. Be sure to check out
-DF as a possibly better way to do incremental backups.
-AS
--archive‐set
[WIN32] Only include files that have the archive bit set. Di‐
rectories are not stored when -AS is used, though by default the
paths of entries, including directories, are stored as usual and
can be used by most unzips to recreate directories.
The archive bit is set by the operating system when a file is
modified and, if used with -AC, -AS can provide an incremental
backup capability. However, other applications can