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:
- -r : Recursively compress directories.
- -x : Exclude specified files or directories from compression.
- -1..9 : Specify compression level, with higher numbers indicating higher compression.
- -l : Display compression information.
- -v : Display detailed information about the compression process.
Examples:
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.