zoukankan      html  css  js  c++  java
  • centos 之7zip

    首先,我得说几句,我第一次进行了实验。

    压缩文件夹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.bz2
    tar -jxvf p7zip_9.20.1_src_all.tar.bz2
    cd p7zip_9.20.1
    make
    make 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.rpm
    rpm -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.rpm
    rpm -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.rpm
    rpm -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.rpm
    rpm -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-18
    p7zip 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


    版权声明:本文博主原创文章。博客,未经同意不得转载。

  • 相关阅读:
    邮件收件与草稿箱sql
    [转]全局变量与全局静态变量的区别:
    工作:8月份6-14号的工作初级经验(零碎) 关于传值id经常犯的错误
    网络婚礼之AFNetWorking3.0
    网络热恋之NSURLSession
    网络热恋之json解析
    网络热恋之SDWebImage
    网络热恋之XML解析
    网络&热恋NSURLConnection代理及GET¥POST请求
    网络邂逅&网络异步请求
  • 原文地址:https://www.cnblogs.com/mengfanrong/p/4842276.html
Copyright © 2011-2022 走看看