Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

To install 7zip software to process archived files in a Linux system

2025-04-09 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article introduces the relevant knowledge of "installing 7zip software in the Linux system to deal with archived files". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

7zip is an open source archiving application that was originally developed for Windows systems. It can package or unpack archives in a variety of formats, including XZ, GZIP, TAR, ZIP and BZIP2 in addition to its native 7z format. Typically, 7zip is also used to extract files in RAR, DEB, RPM, and ISO formats. In addition to simple archiving, 7zip also supports AES-256 algorithm encryption, self-decompression and multi-volume archiving. On systems that support POSIX standards (Linux, Unix, BSD), native 7zip programs are ported and named p7zip (short for "POSIX 7zip").

Here is how to install 7zip (or p7zip) in Linux.

Install 7zip on a Debian, Ubuntu, or Linux Mint system

There are three 7zip software packages in the Debian-based distribution system.

P7zip: contains 7zr (the smallest 7zip archiving tool) that can only handle the native 7z format.

P7zip-full: contains 7z and supports 7z, LZMA2, XZ, ZIP, CAB, GZIP, BZIP2, ARJ, TAR, CPIO, RPM, ISO and DEB formats.

P7zip-rar: contains a plug-in that can extract RAR files.

It is recommended that you install the p7zip-full package (not p7zip) because this is the most complete 7zip package and supports many archive formats. In addition, if you want to work with RAR files, you need to install the p7zip-rar package, which is made into a separate plug-in package because RAR is a proprietary format.

The code is as follows:

$sudo apt-get install p7zip-full p7zip-rar

Install 7zip on a Fedora or CentOS/RHEL system

Two 7zip packages are available on the Red Hat-based distribution system.

P7zip: contains 7za commands that support 7z, ZIP, GZIP, CAB, ARJ, BZIP2, TAR, CPIO, RPM and DEB formats.

P7zip-plugins: contains 7z commands and additional plug-ins that extend 7za commands (for example, support for extraction in ISO format).

On CentOS/RHEL systems, you need to make sure that the EPEL repository is available before running the following command, but no additional repositories are needed on Fedora systems.

The code is as follows:

$sudo yum install p7zip p7zip-plugins

Note that unlike Debian-based publishing systems, Red Hat-based publishing systems do not provide RAR plug-ins, so you cannot use the 7z command to extract and extract RAR files.

Create or extract an archive file using 7z

Once the 7zip software is installed, you can use the 7z command to package and unpack a variety of archives. The 7z command uses different plug-ins to assist in processing archive files in the corresponding format.

Use the "a" option to create an archive file that can be created in 7z, XZ, GZIP, TAR, ZIP, and BZIP2 formats. If the specified archive already exists, it "appends" the file to the existing archive instead of overwriting the original archive.

The code is as follows:

$7z a

Use the "e" option to extract an archive file, which will be placed in the current directory. Extraction supports much more formats than are supported at creation time, including 7z, XZ, GZIP, TAR, ZIP, BZIP2, LZMA2, CAB, ARJ, CPIO, RPM, ISO, and DEB.

The code is as follows:

$7z e

Another way to unpack is to use the "x" option. Unlike the "e" option, it uses the full path to extract archived content.

The code is as follows:

$7z x

To view a list of archived files, use the "l" option.

The code is as follows:

$7z l

To update or delete the archive file, use the "u" and "d" options, respectively.

The code is as follows:

$7z u

$7z d

To test the integrity of the archive, use:

The code is as follows:

$7z t

This is the end of the "steps for installing 7zip software to deal with archived files in a Linux system". Thank you for your reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report