Ubuntu(linux) 7z压缩和解压缩命令

本文介绍了在Ubuntu 20.04.4 LTS系统中使用7z进行文件压缩和解压缩的方法。首先通过`sudo apt install p7zip`命令安装7z,然后使用`7zr a`命令进行压缩,如`7zra a.7z files/`,将files文件夹及其内容压缩为a.7z。解压缩则用`7zr x`命令,例如`7zr xa.7z`,将a.7z解压到当前目录。
摘要由CSDN通过智能技术生成

Ubuntu(linux) 7z压缩和解压缩命令

环境

  • HOST OS:Ubuntu 20.04.4 on VMware

内容

安装
sudo apt install p7zip

安装后输入以下命令,得到版本信息确认安装成功

7zr

image-20220730085852854

Usage: 7za […] <archive_name> [<file_names>…]
[<@listfiles…>]

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
压缩命令

将files文件夹和其下的2个文件压缩为a.7z

7zr a a.7z files/

image-20220730092937894

解压缩命令

将a.7z解压缩到当前文件夹

7zr x a.7z

image-20220730093119290

参考

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值