Ubuntu(linux) 7z压缩和解压缩命令
环境
- HOST OS:Ubuntu 20.04.4 on VMware
内容
安装
sudo apt install p7zip
安装后输入以下命令,得到版本信息确认安装成功
7zr
Usage: 7za […] <archive_name> [<file_names>…]
a : Add files to archive b : Benchmark d : Delete files from archive e : Extract files from archive (without using directory names) h : Calculate hash values for files i : Show information about supported formats l : List contents of archive rn : Rename files in archive t : Test integrity of archive u : Update files to archive x : eXtract files with full paths
[<@listfiles…>]
压缩命令
将files文件夹和其下的2个文件压缩为a.7z
7zr a a.7z files/
解压缩命令
将a.7z解压缩到当前文件夹
7zr x a.7z