Home >Operation and Maintenance >Linux Operation and Maintenance >Usage of linux compressed file command zip

Usage of linux compressed file command zip

angryTom
angryTomOriginal
2020-02-08 17:08:1612295browse

Windows systems use “.zip” format compressed files. In fact, “.zip” format files are a common compressed file type for both Windows and Linux systems. They belong to one of several mainstream compression formats (zip, rar, etc.). It is a fairly simple storage format that compresses each file separately.

Usage of linux compressed file command zip

Usage of linux compressed file command zip

zip [选项] 压缩包名 源文件或源目录列表

Options:

##-rRecursively compress directories, and Compress all files and subdirectories in the specified directory. -mAfter compressing the file, deleting the original file is equivalent to moving the file into the compressed file. -vDisplay detailed compression process information. -qDo not display the command execution process during compression. -Compression levelThe compression level is a number from 1 to 9, -1 means faster compression, and -9 means better compression. -uUpdate the compressed file, that is, add new files to the compressed file.
Option Meaning
Usage examples:


1. Compress a single file

zip ana.zip anaconda-ks.cfg

2. Compress multiple files

zip test.zip install.log install.log.syslog

3. Compressed folder


zip -r dir1.zip dir1

(Online video tutorial sharing:

linux video tutorial)

The above is the detailed content of Usage of linux compressed file command zip. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn