not spanned
archives, though a procedure exists for converting split archives of the
right size to spanned archives. The reverse is also true, where each
file of a spanned archive can be copied in order to files with the above
names to create a split archive.
Use -s to set the split size and create a split archive. The size is
given as a number followed optionally by one of k (kB), m (MB), g (GB),
or t (TB) (the default is m). The -sp option can be used to pause zip
between splits to allow changing removable media, for example, but read
the descriptions and warnings for both -s and -sp below.
Though zip does not update split archives, zip provides the new option
-O (--output-file or --out) to allow split archives to be updated and
saved in a new archive. For example,
zip inarchive.zip foo.c bar.c --out outarchive.zip
reads archive inarchive.zip, even if split, adds the files foo.c and
bar.c, and writes the resulting archive to outarchive.zip. If inar‐
chive.zip is split then outarchive.zip defaults to the same split size.
Be aware that if outarchive.zip and any split files that are created
with it already exist, these are always overwritten as needed without
warning. This may be changed in the future.
Unicode. Though the zip standard requires storing paths in an archive
using a specific character set, in practice zips have stored paths in
archives in whatever the local character set is. This creates problems
when an archive is created or updated on a system using one character
set and then extracted on another system using a different character
set. When compiled with Unicode support enabled on platforms that sup‐
port wide characters, zip now stores, in addition to the standard local
path for backward compatibility, the UTF‐8 translation of the path.
This provides a common universal character set for storing paths that
allows these paths to be fully extracted on other systems that support
Unicode and to match as close as possible on systems that don’t.
On Win32 systems where paths are internally stored as Unicode but repre‐
sented in the local character set, it’s possible that some paths will be
skipped during a local character set directory scan. zip with Unicode
support now can read and store these paths. Note that Win 9x systems
and FAT file systems don’t fully support Unicode.
Be aware that console windows on Win32 and Unix, for example, sometimes
don’t accurately show all characters due to how each operating system
switches in character sets for display. However, directory navigation
tools should show the correct paths if the needed fonts are loaded.
Command line format. 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.