本文链接:https://blog.csdn.net/yori_chen/article/details/80493383
[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.
1
2
3
4
5
6
7
8
刚开始以为是压缩包文件部分信息丢失,导致解压出错了,不应该呀,怎么会出错呢,,emmmm,还是感觉不对劲,于是Google了下:

一般在linux下解压zip文件,直接用系统默认的extract here进行解压(默认使用的是 unzip)
如果压缩文件.zip是大于2G的,那unzip就无法使用了,这是由于C库中long类型数据所能表示的文件偏移在32位机子上只能有2G
所以如果要解压大文件,可以使用7zip来解压
安装7zip
官网地址:http://www.7-zip.org/download.html
软件下载地址:https://sourceforge.net/projects/p7zip/files/p7zip/

这里使用16.02版本进行安装,linux环境

wget https://jaist.dl.sourceforge.net/project/p7zip/p7zip/16.02/p7zip_16.02_src_all.tar.bz2
tar -jxvf p7zip_16.02_src_all.tar.bz2
cd p7zip_16.02
make && make install
1
2
3
4
如果执行make命令时,提示安装g++的话,请执行 yum install gcc-c++

出现 tar (child): bzip2: Cannot exec: No such file or directory,请安装yum install bzip2 -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

1
2
3
4
5
6
7
8
9
7z命令的使用
解压缩7z文件
7za x test.zip -r -o./
1
参数含义:

x 代表解压缩文件,并且是按原始目录树解压(还有个参数 e 也是解压缩文件,但其会将所有文件都解压到根下,而不是自己原有的文件夹下)
test.zip 是当前目录下的压缩文件,这里用做测试文件
-r 表示递归解压缩所有的子文件夹
-o 是指定解压到的目录,-o后是没有空格的,直接接目录(-o./ 为当前目录)
压缩文件/文件夹
7za a -t7z -r test.7z /opt/test/*
1
参数含义:

a 代表添加文件/文件夹到压缩包
-t 是指定压缩类型,这里定为7z,可不指定,因为7za默认压缩类型就是7z
-r 表示递归所有的子文件夹
test.7z 是压缩好后的压缩包名
/opt/test/* 是压缩目录
注意:7za不仅仅支持.7z压缩格式,还支持.zip.、tar、.bz2等压缩类型

unzip解压失败( cannot find zipfile directory)的更多相关文章

  1. unzip解压失败

    [root@localhost soft]# unzip QY.zip Archive: QY.zip End-of-central-directory signature not found. Ei ...

  2. unzip解压3G或者4G以上文件失败的解决方法

    Linux下,使用unzip解压时,报错:End-of-central-directory signature not found.  Either this file is nota zipfile ...

  3. [转]unzip解压windows zip乱码的处理

    [转]unzip解压windows zip乱码的处理 http://blog.sina.com.cn/s/blog_6c9d65a101012gz0.html 朋友从windows传过来的zip文件, ...

  4. FTP下载导致Zip解压失败的原因

    情形:网关通过FTP下载快钱对账文件时通过Apache下commons-net的commons-net-3.5.jar进行封装,对账文件中有中文和英文的文字,大部分情况下能够下载成功,而且也能解压成功 ...

  5. Ubuntu 使用unzip解压乱码的问题

    由于win使用的是GBK编码,在win下打包zip的压缩文件在ubuntu下使用unzip解压会出现乱码的问题. 解决方案: 换软件,不用unzip,使用unar 18.04是默认安装的,如果没有默认 ...

  6. SSZipArchive解压失败的原因

    SSZipArchive 解压失败的原因是路径不对解压失败后,修正路径后再次解压就会出现解压失败的情况,代理方法也不会走也没有日志输出.解决方法就是删除手机上的软件再次运行就可以了.这个问题也就在内部 ...

  7. composer install 失败,无法用 unzip 解压归档、proc_open() 函数未支持

    前言 记得最近好像有不只一个朋友问过 composer install 安装依赖时出现异常,导致项目无法运行.下面简单记录一下其中 2 个比较频繁问题的解决办法. 问题 & 解决 1.unzi ...

  8. gunzip 和 unzip 解压文件到指定的目录

    Linux 常用的压缩命令有 gzip 和 zip,两种压缩包的结尾不同:zip 压缩的后文件是 *.zip ,而 gzip 压缩后的文件 *.gz  相应的解压缩命令则是 gunzip 和 unzi ...

  9. Linux unzip解压文件到某个目录下面

    1,例如我想解压Metinfo5.2.zip  到某一个文件夹下,执行下面的命令就可以了 sudo unzip  MetInfo5.2.zip  -d  metinfo-bak

随机推荐

  1. 将exe和dll打包为一个exe文件

    通过Nuget安装Costura.Fody 公司项目需要支持.NET 4.0(使用VS2017),Costura.Fody库从3.2.1开始支持4.0,但是不能装最新的Fody,否则会提示: Fody ...

  2. django应用之corsheaders[跨域设置]

    安装 pip install django-cors-headers 注册应用 INSTALLED_APPS = ( ... 'corsheaders', ... ) 中间层设置 MIDDLEWARE ...

  3. MySQL 5.7数据库参数优化

    连接相关参数 max_connections:允许客户端并发连接的最大数量,默认值是151,一般将该参数设置为500-2000max_connect_errors:如果客户端尝试连接的错误数量超过这个 ...

  4. prometheus学习系列二: Prometheus安装

    下载 在prometheus的官网的download页面,可以找到prometheus的下载二进制包. [root@node00 src]# cd /usr/src/ [root@node00 src ...

  5. Django 之组合搜索

    现在很多网站都会有这样的组合搜索功能,其实质是几个模型之间组合对数据库进行查询,并将结果显示到页面上. 每一行都是一个模型,模型之间有着连表关系(一对多.多对多等) 模型设计 总共四个模型:分别为方向 ...

  6. Django之ORM多对多表创建方式,AJAX异步提交,分页器组件等

    MTV与MVC MTV模型: ​ M:模型层(models.py),负责业务对象和数据库关系的映射(ORM) ​ T:模板层(Template),负责如何把页面展示给用户(HTML) ​ V:视图层( ...

  7. (一)MongoDB安装

    (一)MongoDB安装 mongodb 2018年03月06日 15时53分29秒 安装准备 启动mongodb 1.命令行参数启动 2.从配置文件启动 使用服务启动mongodb 参数解释 用户授 ...

  8. kafaka可视化工具kafkatool

    炒作就像动物世界的森林法则,专门攻击弱者,这种做法往往能够百发百中.                                                                   ...

  9. 使用idea创建项目如何忽略iml文件

    在图中圈出的输入栏中输入“*.iml;”,点下OK就可以了,如图进入idea项目窗口,如图 点下file,进入file菜单窗口,如图 点下settings,进入到settings窗口,如图 在输入框f ...

  10. python-uiautomator2

    简单介绍 python-uiautomator2是一个自动化测试开源工具,仅支持Android平台的原生应用测试. 支持平台及语言 python-uiautomator2封装了谷歌自带的uiautom ...