本文链接: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等压缩类型

最新文章

  1. samba共享目录
  2. Ip地址查询
  3. Apache Shiro和Spring Security的详细对比
  4. NSFileManager
  5. 如何把TOMCAT 添加到服务中自动启动
  6. svn利用TortoiseSVN忽略文件或文件夹
  7. CSS(Cascading Style Sheet,叠层样式表),作用是美化HTML网页。
  8. 怎样用PHP制作验证码呢?
  9. 由Tencent://Message协议想到的一个解决方案
  10. 推荐一些C#相关的网站、资源和书籍
  11. 基于jQuery的上下左右无缝滚动应用(单行或多行)
  12. Access之C#连接Access
  13. Hive的分区操作~~~~~~
  14. Assignments
  15. ES5-ES6-ES7_Generator 函数
  16. Luogu P1439 【模板】最长公共子序列
  17. Django-分页、中间件和请求的声明周期
  18. 利用gulp搭建less编译环境
  19. JPA(五):映射关联关系------映射单向多对一的关联关系
  20. 统计学习方法:CART算法

热门文章

  1. 英语hawkbillturtle玳瑁
  2. Nginx学习(二)
  3. I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2
  4. C#语法一些简化备忘
  5. CentOS7- 配置阿里镜像源
  6. 【Maven】Maven中排除依赖、归类依赖、优化依赖
  7. gitlab上下载项目
  8. 逆向破解之160个CrackMe —— 015
  9. 《MVC架构下网站的设计与实现》论文笔记(十八)
  10. springMVC(2)