are allowed as in
zip ‐r foo foo1 foo2
which first zips up foo1 and then foo2, going down each direc‐
tory.
Note that while wildcards to ‐r are typically resolved while re‐
cursing down directories in the file system, any ‐R, ‐x, and ‐i
wildcards are applied to internal archive pathnames once the di‐
rectories are scanned. To have wildcards apply to files in sub‐
directories when recursing on Unix and similar systems where the
shell does wildcard substitution, either escape all wildcards or
put all arguments with wildcards in quotes. This lets zip see
the wildcards and match files in subdirectories using them as it
recurses.
-R
--recurse-patterns
Travel the directory structure recursively starting at the cur‐
rent directory; for example:
zip ‐R foo "*.c"
In this case, all the files matching *.c in the tree starting at
the current directory are stored into a zip archive named
foo.zip. Note that *.c will match file.c, a/file.c and a/b/.c.
More than one pattern can be listed as separate arguments. Note
for PKZIP users: the equivalent command is
pkzip ‐rP foo *.c
Patterns are relative file paths as they appear in the archive,
or will after zipping, and can have optional wildcards in them.
For example, given the current directory is foo and under it are
directories foo1 and foo2 and in foo1 is the file bar.c,
zip ‐R foo/*
will zip up foo, foo/foo1, foo/foo1/bar.c, and foo/foo2.
zip ‐R */bar.c
will zip up foo/foo1/bar.c. See the note for ‐r on escaping
wildcards.
-RE
--regex
[WIN32] Before zip 3.0, regular expression list matching was en‐
abled by default on Windows platforms. Because of confusion re‐
sulting from the need to escape "[" and "]" in names, it is now
off by default for Windows so "[" and "]" are just normal charac‐
ters in names. This option enables [] matching again.
-s splitsize
--split-size splitsize
Enable creating a split archive and set the split size. A split
archive is an archive that could be split over many files. As
the archive is created, if the size of the archive reaches the
specified split size, that split is closed and the next split
opened. In general all splits but the last will be the split
size and the last will be whatever is left. If the entire
archive is smaller than the split size a single‐file archive is
created.
Split archives are stored in numbered files. For example, if the
output archive is named archive and three splits are required,
the resulting archive will be in the three files archive.z01,
archive.z02, and archive.zip. Do not change the numbering of
these files or the archive will not be readable as these are used
to determine the order the splits are read.
Split size is a number optionally followed by a multiplier. Cur‐
rently the number must be an integer. The multiplier can cur‐
rently be one of k (kilobytes), m (megabytes), g (gigabytes), or
t (terabytes). As 64k is the minimum split size, numbers without
multipliers default to megabytes. For example, to create a split
archive called foo with the contents of the bar directory with