补充 zip 处理指令.
Signed-off-by: chen.yang <chen.yang@yuzhen-iot.com>
This commit is contained in:
parent
9469ebe4b9
commit
01e2e24375
|
@ -4,17 +4,37 @@
|
|||
|
||||
安装指令如下:
|
||||
|
||||
sudo apt-get install zip unzip
|
||||
sudo pacman -S zip unzip
|
||||
```bash
|
||||
sudo apt-get install zip unzip
|
||||
sudo pacman -S zip unzip
|
||||
```
|
||||
|
||||
## 压缩
|
||||
|
||||
使用 zip 对多个文件或文件夹进行压缩如下:
|
||||
|
||||
zip <zip package> <file1> <file2> ...
|
||||
```bash
|
||||
zip <zip package> <file1> <file2> ...
|
||||
# 递归
|
||||
zip -r <zip package> <file1> <file2> ...
|
||||
```
|
||||
|
||||
## 解压
|
||||
|
||||
使用 unzip 将压缩包解压到指定目录下:
|
||||
|
||||
unzip <zip package> -d <output path>
|
||||
```bash
|
||||
unzip <zip package> -d <output path>
|
||||
```
|
||||
|
||||
## 查看压缩包内容
|
||||
|
||||
```bash
|
||||
zip -sf <zip package>
|
||||
```
|
||||
|
||||
## 删除压缩包中的内容
|
||||
|
||||
```bash
|
||||
zip -dv <zip package> <file to be deleted>
|
||||
```
|
||||
|
|
Loading…
Reference in New Issue