Usage of linux compressed file command zip

angryTom
Release: 2020-02-08 17:08:16
Original
12138 people have browsed it

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 [选项] 压缩包名 源文件或源目录列表
Copy after login

Options:

##-r Recursively compress directories, and Compress all files and subdirectories in the specified directory. -m After compressing the file, deleting the original file is equivalent to moving the file into the compressed file. -v Display detailed compression process information. -q Do not display the command execution process during compression. -Compression level The compression level is a number from 1 to 9, -1 means faster compression, and -9 means better compression. -u Update 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
Copy after login

2. Compress multiple files

zip test.zip install.log install.log.syslog
Copy after login

3. Compressed folder


zip -r dir1.zip dir1
Copy after login
(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!

Related labels:
source:php.cn
Statement of this Website
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
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!