centos 之7zip

來源:互聯網
上載者:User

標籤:7z

首先不得不說的事,我先進行了實驗。

壓縮一個目錄html

rar壓縮   結果5.18M

zip壓縮  結果5.06M

7z壓縮   結果870K



第一種,源碼編譯安裝
官網:http://www.7-zip.org/download.html
源檔案項目地址:http://sourceforge.net/projects/p7zip/,目前最新版為9.20.1。

執行以下命令下載安裝:

wget http://nchc.dl.sourceforge.net/project/p7zip/p7zip/9.20.1/p7zip_9.20.1_src_all.tar.bz2tar -jxvf p7zip_9.20.1_src_all.tar.bz2cd p7zip_9.20.1makemake install

最後一步make install後出現以下資訊,即為安裝完畢

./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- installing HTML help in /usr/local/share/doc/p7zip/DOCS

第二種,rpm安裝
:http://pkgs.repoforge.org/p7zip/,請以最新版為準。

在 CentOS 5.x 32位下安裝7ZIP

wget http://pkgs.repoforge.org/p7zip/p7zip-9.20.1-1.el5.rf.i386.rpmrpm -ivh p7zip-9.20.1-1.el5.rf.i386.rpm

在 CentOS 5.x 64位下安裝7ZIP

wget http://pkgs.repoforge.org/p7zip/p7zip-9.20.1-1.el5.rf.x86_64.rpmrpm -ivh p7zip-9.20.1-1.el5.rf.x86_64.rpm

在 CentOS 6.x 32位下安裝7ZIP

wget http://pkgs.repoforge.org/p7zip/p7zip-9.20.1-1.el6.rf.i686.rpmrpm -ivh p7zip-9.20.1-1.el6.rf.i686.rpm

在 CentOS 6.x 64位下安裝7ZIP

wget http://pkgs.repoforge.org/p7zip/p7zip-9.20.1-1.el6.rf.x86_64.rpmrpm -ivh p7zip-9.20.1-1.el6.rf.x86_64.rpm

第三種,yum安裝
通過《在Centos 5.x或6.x上安裝RHEL EPEL Repo》一文,安裝RHEL EPEL Repo後,即可使用yum安裝7ZIP。

命令如下:

yum install -y p7zip

7-Zip (A) [64] 9.20  Copyright (c) 1999-2010 Igor Pavlov  2010-11-18p7zip Version 9.20 (locale=zh_CN.UTF-8,Utf16=on,HugeFiles=on,1 CPU)Usage: 7za <command> [<switches>...] <archive_name> [<file_names>...]       [<@listfiles...>]<Commands>  a: Add files to archive  b: Benchmark  d: Delete files from archive  e: Extract files from archive (without using directory names)  l: List contents of archive  t: Test integrity of archive  u: Update files to archive  x: eXtract files with full paths<Switches>  -ai[r[-|0]]{@listfile|!wildcard}: Include archives  -ax[r[-|0]]{@listfile|!wildcard}: eXclude archives  -bd: Disable percentage indicator  -i[r[-|0]]{@listfile|!wildcard}: Include filenames  -m{Parameters}: set compression Method  -o{Directory}: set Output directory  -p{Password}: set Password  -r[-|0]: Recurse subdirectories  -scs{UTF-8 | WIN | DOS}: set charset for list files  -sfx[{name}]: Create SFX archive  -si[{name}]: read data from stdin  -slt: show technical information for l (List) command  -so: write data to stdout  -ssc[-]: set sensitive case mode  -t{Type}: Set type of archive  -u[-][p#][q#][r#][x#][y#][z#][!newArchiveName]: Update options  -v{Size}[b|k|m|g]: Create volumes  -w[{path}]: assign Work directory. Empty path means a temporary directory  -x[r[-|0]]]{@listfile|!wildcard}: eXclude filenames


centos 之7zip

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.