zip ‐i\*.c ‐r foo .
(no space between option and value) or
zip ‐‐include=\*.c ‐r foo .
as additional examples. The single value forms are not recom‐
mended because they can be confusing and, in particular, the
-ifile format can cause problems if the first letter of file com‐
bines with i to form a two‐letter option starting with i. Use
-sc to see how your command line will be parsed.
Also possible:
zip ‐r foo . ‐i@include.lst
which will only include the files in the current directory and
its subdirectories that match the patterns in the file in‐
clude.lst.
Files to -i and -x are patterns matching internal archive paths.
See ‐R for more on patterns.
-I
--no‐image
[Acorn RISC OS] Don’t scan through Image files. When used, zip
will not consider Image files (eg. DOS partitions or Spark
archives when SparkFS is loaded) as directories but will store
them as single files.
For example, if you have SparkFS loaded, zipping a Spark archive
will result in a zipfile containing a directory (and its content)
while using the ’I’ option will result in a zipfile containing a
Spark archive. Obviously this second case will also be obtained
(without the ’I’ option) if SparkFS isn’t loaded.
-ic
--ignore‐case
[VMS, WIN32] Ignore case when matching archive entries. This op‐
tion is only available on systems where the case of files is ig‐
nored. On systems with case‐insensitive file systems, case is
normally ignored when matching files on the file system but is
not ignored for ‐f (freshen), ‐d (delete), ‐U (copy), and similar
modes when matching against archive entries (currently ‐f ignores
case on VMS) because archive entries can be from systems where
case does matter and names that are the same except for case can
exist in an archive. The -ic option makes all matching case in‐
sensitive. This can result in multiple archive entries matching
a command line pattern.
-j
--junk‐paths
Store just the name of a saved file (junk the path), and do not
store directory names. By default, zip will store the full path
(relative to the current directory).
-jj
--absolute‐path
[MacOS] record Fullpath (+ Volname). The complete path including
volume will be stored. By default the relative path will be
stored.
-J
--junk‐sfx
Strip any prepended data (e.g. a SFX stub) from the archive.
-k
--DOS‐names
Attempt to convert the names and paths to conform to MSDOS, store
only the MSDOS attribute (just the user write attribute from
Unix), and mark the entry as made under MSDOS (even though it was
not); for compatibility with PKUNZIP under MSDOS which cannot
handle certain names such as those with two dots.
-l
--to‐crlf
Translate the Unix end‐of‐line character LF into the MSDOS con‐
vention CR LF. This option should not be used on binary files.
This option can be used on Unix if the zip file is intended for
PKUNZIP under MSDOS. If the input files already contain CR LF,
this option adds an extra CR. This is to ensure that unzip ‐a on
Unix will get back an exact copy of the original file, to undo
the effect of zip ‐l. See