NAME
zip - package and compress files into a ZIP archive
SYNOPSIS
zip [OPTION...] ZIPFILE FILE...
DESCRIPTION
zip compresses and packs FILE(s) into a single ZIP archive that is compatible with PKZIP. By default, packing a directory to a ZIPFILE always implies that the subdirectories below should be included in the archive.
OPTIONS
-i 'PATTERN[, PATTERN...]'
Include only those files that match the specified PATTERN(s).
-x 'PATTERN[, PATTERN...]'
Exclude files that match the specified PATTERN(s).
EXAMPLE
To archive a directory, including its subdirectories, into a ZIPFILE:
To archive a directory, excluding the content of its subdirectories, into a ZIPFILE:
To archive a directory and its subdirectories into a ZIPFILE without including all of files end with .txt and .html suffixes:
To archive a directory and its subdirectories into a ZIPFILE, excluding those files end with .dat suffix in the sub_dir_1 directory:
NOTES
zip command terminates with an error if all of specified FILEs are directories and all of them are empty.
Execution of zip command would fail if invalid patterns are specified by -x and -i options, or, valid patterns are specified but cause conflict or all of files are excluded by the specified patterns. When this happens, zip terminates with one line message without detail information provided.
SEE ALSO
unzip
tar
gzip
gunzip