zoukankan      html  css  js  c++  java
  • Linux环境下解压超过4GB的zip文件

    今天在Linux服务器中解压一个zip的压缩包,提示如下错误信息:

    [root@appsrv01 ZIP_BCSA_COURSES]# unzip BCSA_MEDIAS_BAK_20161118.zip 
    error:  Zip file too big (greater than 4294959102 bytes)
    Archive:  BCSA_MEDIAS_BAK_20161118.zip
    warning [BCSA_MEDIAS_BAK_20161118.zip]:  31450041244 extra bytes at beginning or within zipfile
      (attempting to process anyway)
    error [BCSA_MEDIAS_BAK_20161118.zip]:  start of central directory not found;
      zipfile corrupt.
      (please check that you have transferred or created the zipfile in the
      appropriate BINARY mode and that you have compiled UnZip properly)
    [root@appsrv01 ZIP_BCSA_COURSES]#

    经过百度才知道,原来unzip不能解压超过4GB的zip文件(没想到这么弱。。。),需要把鸟枪换炮(p7zip)了。

    yum -y install p7zip

    [root@appsrv01 ZIP_BCSA_COURSES]# yum -y install p7zip
    Loaded plugins: katello, product-id, security, subscription-manager
    Updating certificate-based repositories.
    Unable to read consumer identity
    Setting up Install Process
    Resolving Dependencies
    --> Running transaction check
    ---> Package p7zip.x86_64 0:9.20.1-2.el5 set to be updated
    --> Finished Dependency Resolution
    
    Dependencies Resolved
    
    ======================================================================================
     Package            Arch            Version            Repository            Size
    ======================================================================================
    Installing:
     p7zip                x86_64            9.20.1-2.el5    epel                745 k
    
    Transaction Summary
    ======================================================================================
    Install       1 Package(s)
    Upgrade       0 Package(s)
    
    Total download size: 745 k
    Downloading Packages:
    p7zip-9.20.1-2.el5.x86_64.rpm                                                                                                                                           | 745 kB     00:00     
    Running rpm_check_debug
    Running Transaction Test
    Finished Transaction Test
    Transaction Test Succeeded
    Running Transaction
      Installing     : p7zip                                                                                                                                                                   1/1 
    Installed products updated.
    
    Installed:
      p7zip.x86_64 0:9.20.1-2.el5                                                                                                                                                                  
    
    Complete!
    [root@appsrv01 ZIP_BCSA_COURSES]#
    安装完毕后使用“7za x BCSA_COURSE.zip”即可解压超过4GB的zip压缩文件。
  • 相关阅读:
    LintCode-174.删除链表中倒数第n个节点
    LintCode-165.合并两个排序链表
    LintCode-371.用递归打印数字
    LintCode-140.快速幂
    LintCode-373.奇偶分割数组
    NOI 2015 品酒大会 (后缀数组+并查集)
    NOI 2016 优秀的拆分 (后缀数组+差分)
    POJ 2774 Long Long Message (后缀数组+二分)
    BZOJ 1717 [USACO06DEC] Milk Patterns (后缀数组+二分)
    POJ 1743 [USACO5.1] Musical Theme (后缀数组+二分)
  • 原文地址:https://www.cnblogs.com/xusweeter/p/6105661.html
Copyright © 2011-2022 走看看