CentOS installation 7zip

Source: Internet
Author: User

To decompress a 2G zip file to the virtual machine, the built-in content is not fully recognized. You have to install this.

I found an article and it should be executable. However, I am re-installing the VM now, and the/OPT option is too small .. Ah.

7zip is an open-source compression software. It is very compact and provides similar functions as WinRAR, but supports almost twice as many formats as the latter. 7z is fully open-source, including compression algorithms. It also allows you to easily use the libraries it provides and integrate the compression function into your own programs.

Install: run the following command line by line

Wgethttp: // nchc.dl.sourceforge.net/sourceforge/p7zip/p7zip_4.65_src_all.tar.bz2
Tar-xjvfp7zip_4.65_src_all.tar.bz2
Cdp7zip_4.65
Make
Makeinstall

The following information indicates that 7zip is successfully installed.

./Install. sh/usr/local/bin/usr/local/lib/p7zip/usr/local/man/usr/local/share/doc/p7zip
-Installing/usr/local/bin/7za
-Installing/usr/local/man/man1/7z. 1
-Installing/usr/local/man/man1/7za. 1
-Installing/usr/local/man/man1/7zr. 1
-Installing/usr/local/share/doc/p7zip/README
-Installing/usr/local/share/doc/p7zip/ChangeLog
-InstallingHTMLhelpin/usr/local/share/doc/p7zip/DOCS

Command Line usage:

Command is an operation command, as follows:
A added to the compressed file
B Benchmark Test to test the current performance of 7z
D. delete the file from the compressed file.
E. Extract from the compressed file, but does not contain the directory structure (that is, all files at all levels are extracted to a directory)
L list compressed file content
T test compressed files
U updates files to compressed files
X extract from the compressed file, including the directory structure

The most common commands are a, l, and x.
For specific use, let's take a few examples to understand:

Compress a.txt and B .txtto c.7z:
7zaac.7za.txtb.txt (the first file name after command a is the compressed file name, and then the file list)

Compress a.txt and B .txt to/home/www/c.7z:
7zaa/home/www/c.7za.txtb.txt (directory name contains spaces, enclosed in quotation marks)

Column content of c.7z:
7zarc.7z

Decompress c.7z to/home/www:
7zaxc.7z-o/home/www (-o indicates the output directory, and there is no space between it and the directory path)
In this way, extract the directory name that contains the lower-level directory, but do not create a new c folder under/home/www. If necessary, set the output directory to/home/www/c, in this way, the c folder is automatically created.

If you want to generate a zipzip package, you can directly set the target package name to c.zip, then it will automatically use the zip algorithm to compress.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.