其他分享
首页 > 其他分享> > unzip解压失败

unzip解压失败

作者:互联网

[root@localhost soft]# unzip QY.zip 
Archive:  QY.zip
  End-of-central-directory signature not found.  Either this file is not
  a zipfile, or it constitutes one disk of a multi-part archive.  In the
  latter case the central directory and zipfile comment will be found on
  the last disk(s) of this archive.
unzip:  cannot find zipfile directory in one of QY.zip or
        QY.zip.zip, and cannot find QY.zip.ZIP, period.

 

刚开始以为是压缩包文件部分信息丢失,导致解压出错了,不应该呀,怎么会出错呢,,emmmm,还是感觉不对劲,于是Google了下:

  1. 一般在linux下解压zip文件,直接用系统默认的extract here进行解压(默认使用的是 unzip)
  2. 如果压缩文件.zip是大于2G的,那unzip就无法使用了,这是由于C库中long类型数据所能表示的文件偏移在32位机子上只能有2G
  3. 所以如果要解压大文件,可以使用7zip来解压

发现yum install p7zip -y 也可以安装    

./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/DOC

7z命令的使用

解压缩7z文件

7za x test.zip -r -o./

参数含义:

压缩文件/文件夹

7za a -t7z -r test.7z /opt/test/*

参数含义:

注意:7za不仅仅支持.7z压缩格式,还支持.zip.、tar、.bz2等压缩类型

标签:解压,unzip,zip,installing,失败,usr,p7zip,local
来源: https://www.cnblogs.com/kesz/p/10763187.html