Zip

Zip archives and compresses files using a format compatible with PKZIP and WinZip. Unlike Linux or UNIX compression and archiving utilities, zip combines archiving and compression.

For options, see the man page. zip keeps original files intact ( except for very particular options ). To decompress files use unzip.

Usecases
zip -r target source
 * You want to pack a folder source including all files. The archive shall be named target.zip

Examples

 * Creates myarchive.zip, an archive containing every files and directories present in myfolder, even files with a starting dot.
 * Creates the documents.zip archive containing all the files in the current directory. Files beginning with a dot might be excluded depending on your shell filename expansion feature configuration. Directories will be empty in documents.zip.
 * Creates the documents.zip archive containing all the .sdw files present in the current directory.
 * Archives all files and directories in the working directory excluding names with the .doc suffix. Please note the backslashed "*" character to prevent the shell from interpreting it. It will be interpreted and applied by the zip command instead, in all processed directories.
 * Appends all the files of the essays directory to the existing documents.zip archive.
 * Moves all files of the current directory to the documents.zip archive. This is dangerous as this actually deletes those files. Please read the man page for more details.
 * Archives all files and directories in the working directory excluding names with the .doc suffix. Please note the backslashed "*" character to prevent the shell from interpreting it. It will be interpreted and applied by the zip command instead, in all processed directories.
 * Appends all the files of the essays directory to the existing documents.zip archive.
 * Moves all files of the current directory to the documents.zip archive. This is dangerous as this actually deletes those files. Please read the man page for more details.
 * Appends all the files of the essays directory to the existing documents.zip archive.
 * Moves all files of the current directory to the documents.zip archive. This is dangerous as this actually deletes those files. Please read the man page for more details.
 * Moves all files of the current directory to the documents.zip archive. This is dangerous as this actually deletes those files. Please read the man page for more details.

TroubleShooting
zip warning: name not matched
 * You get the error message
 * This can mean your file is bigger than 2 GigaByte and cannot be packed therefore.

zip I/O error: Invalid argument
 * You get the error message
 * This can mean your file is bigger than 2 GigaByte and cannot be packed therefore.