赞
踩
> ls *.txt
1.txt 2.txt 3.txt 4.txt
执行命令
> zip -r txt.zip *.txt
生成压缩包
> ls *.zip
txt.zip
查看压缩包内的文件,有两种方法,用zip/和unzip都可以
> zip -sf txt.zip
Archive contains:
1.txt
2.txt
3.txt
4.txt
Total 4 entries (0 bytes)
> unzip -l txt.zip
Archive: txt.zip
Length Date Time Name
--------- ---------- ----- ----
0 09-02-2018 09:48 1.txt
0 09-02-2018 09:48 2.txt
0 09-02-2018 09:48 3.txt
0 09-02-2018 09:48 4.txt
--------- -------
0 4 files
将压缩文件解压到当前目录的txt文件夹下
> unzip txt.zip -d txt
Archive: txt.zip
extracting: txt/1.txt
extracting: txt/2.txt
extracting: txt/3.txt
extracting: txt/4.txt
完成。
> ./unrar e txt.rar ./txt
UNRAR 5.50 beta 6 freeware Copyright (c) 1993-2017 Alexander Roshal
Extracting from txt.rar
Extracting ./txt/acknow.txt OK
Extracting ./txt/license.txt OK
Extracting ./txt/rar.txt OK
Extracting ./txt/readme.txt OK
Extracting ./txt/whatsnew.txt OK
All OK
完成。
> ./7za e txt.7z -otxt
-o后面加解压路径,没有空格。
完成。
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。