The Linux Newbie Guide  ⇒    Fundamentals     Advanced     Supplement   Command Index   ENG⇒中
All rights reserved, please indicate the source when citing
  

zip - Compress Files with .zip Format




The zip command is used to compress files into the ".zip" format, which is a widely used and cross-platform compression format in both Linux and Windows. zip also supports archiving multiple files into a single compressed file.

The basic usage of the zip command is as follows:
zip [OPTIONS] [FILES...] [OUTPUT-FILE]

Some commonly used options with the zip command include:


Examples:
$ zip backup *.txt

This command compresses all ".txt" files in the current directory and creates an archive named "backup.zip".
Examples:

Examples:

zip -r job.zip job1/ job2/

This command recursively compresses the contents of two directories, "job1/" and "job2/", into a single file named "job.zip".

For more examples and detailed explanations of zip and its parameters, you can refer to the provided link.