7zip是一款开源的压缩软件,可用于文件的提取,原本只可使用于Windows系统,现虽然可用于Linux系统,但安装起来比较麻烦,下面小编就给大家介绍下Linux安装和使用7zip的方法。
7zip is the unix command-line port of 7-zip, a file archiver that archives with high compression ratios.
p7zip-full provides utilities to pack and unpack 7z archives within a shell or using a gui (such as ark, file roller or nautilus).
installing p7zip-full allows file roller to use the very efficient 7z compression format for packing and unpacking files and directories. additionally, it provides the 7z and 7za commands.
list of supported formats:
- packing / unpacking: 7z, zip, gzip, bzip2, xz and tar
- unpacking only: apm, arj, cab, chm, cpio, cramfs, deb, dmg, fat,
hfs, iso, lzh, lzma, lzma2, mbr, msi, mslz, nsis, ntfs, rar (only
if non-free p7zip-rar package is installed), rpm, squashfs, udf,
vhd, wim, xar and z.
p7zip provides 7zr, a light version of 7za, and p7zip, a gzip-like wrapper around 7zr.
下面介绍如何在 Linux 中安装 7zip (或 p7zip)。
在 Debian、Ubuntu 或 Linux Mint 系统中自动安装 7zip
在基于的 Debian 的发布系统中存在有三种 7zip 的软件包。
p7zip: 包含 7zr(最小的 7zip 归档工具),仅仅只能处理原生的 7z 格式。
p7zip-full: 包含 7z ,支持 7z、LZMA2、XZ、ZIP、CAB、GZIP、BZIP2、ARJ、TAR、CPIO、RPM、ISO 和 DEB 格式。
p7zip-rar: 包含一个能解压 RAR 文件的插件。
建议安装 p7zip-full 包(不是 p7zip),因为这是最完全的 7zip 程序包,它支持很多归档格式。此外,如果您想处理 RAR 文件话,还需要安装 p7zip-rar 包,做成一个独立的插件包的原因是因为 RAR 是一种专有格式。
让Ubuntu 支持RAR和7Z文件解压缩
$ sudo apt-get install p7zip-full p7zip-rar
在 Debian、Ubuntu 或 Linux Mint 系统中手动安装 7zip
首先下载p7zip中文官方网站: http://sparanoid.com/lab/7z/ (版本不一定最新)
或者 从 apt-get source p7zip-full 《nice的方式》 获取对应的最新软件包
解压 出来的 代码 ,进入 p7zip-master -> make && make install 可执行文件 bin/7za
对于 7za 支持 文件格式 并不像 自动安装的 支持格式多 需要修改makefile 已达到 最终目的
研究 7zip 格式
参考博客:点击打开链接