• linux解压超过2G大文件


    最近数据服务器出现问题 通过exp命令备份 数据达到14G

    压缩命令

    zip -r 20130314.zip ./20130314.dmp

     

    ls -l 查看文件大小 压缩zip格式也有3.2G

    -rw-r--r-- 1 root   root  3826207807 03-28 22:14 20130314.zip

    新准备的机器 将20130314.zip 文件拷贝到新服务器

    通过 unzip 20130314.zip 出现错误

    [root@tianchi154 ygcg]# unzip 20130314.zip
    Archive:  20130314.zip
    warning [20130314.zip]:  76 extra bytes at beginning or within zipfile
      (attempting to process anyway)
    error [20130314.zip]:  reported length of central directory is
      -76 bytes too long (Atari STZip zipfile?  J.H.Holm ZIPSPLIT 1.1
      zipfile?).  Compensating...
       skipping: 20130314.dmp            need PK compat. v4.5 (can do v2.1)

    note:  didn't find end-of-central-dir signature at end of central dir.
      (please check that you have transferred or created the zipfile in the
      appropriate BINARY mode and that you have compiled UnZip properly)

    查看资料原来是unzip命令不能解压超过2G的文件 通过查找资料有个7z的程序可以解压超过2G的压缩包

    http://pkgs.repoforge.org/p7zip/

    该地址下载7zip包

    首先通过

    file /bin/ls命令查看linux是32位还是64位

    [root@tianchi154 ygcg]# file /bin/ls
    /bin/ls: ELF 64-bit LSB executable, AMD x86-64, version 1 (SYSV), for GNU/Linux 2.6.9, dynamically linked (uses shared libs), for GNU/Linux 2.6.9, stripped
    可以看出是8086cpu中的单字64位长的系列

    所以 我下载了p7zip-plugins-9.04-1.el3.rf.x86_64.rpm和p7zip-9.04-1.el3.rf.x86_64.rpm这两个包

    上传到linux通过rpm命令安装

    rpm -ivh p7zip-9.04-1.el3.rf.x86_64.rpm

    rpm -ivh p7zip-plugins-9.04-1.el3.rf.x86_64.rpm

    安装完成后 通过命令解压

    7z e 20130314.zip解压成功


     

  • 相关阅读:
    前端安全-XSS攻击
    leetcode-0003 无重复字符的最长子串
    leetcode-0002 两数相加
    leetcode-0001 两数之和
    数据结构篇-数组(TypeScript版+Java版)
    前端性能优化(一)-- 文件的压缩与合并
    《深入浅出RxJS》读书笔记
    python工具函数
    [其他]Ubuntu安装genymotion后unable to load VirtualBox engine
    [linux]CentOS无法使用epel源
  • 原文地址:https://www.cnblogs.com/liaomin416100569/p/9331347.html
Copyright © 2020-2023  润新知