Linux

关注公众号 jb51net

关闭
首页 > 网站技巧 > 服务器 > Linux > Linux unzip:cannot find zipfile directory in one of xxx.zip

解决Linux使用解压命令unzip报错:unzip:cannot find zipfile directory in one of xxx.zip问题

作者:hammring

使用rz上传zip文件后解压失败,可能因传输中断导致文件损坏,建议改用scp或sftp重新上传,确保文件完整性,再用unzip解压,检查文件大小及权限,必要时重新压缩上传

Linux unzip:cannot find zipfile directory in one of xxx.zip

在linux服务器下使用rz上传压缩文件,用unzip命令解压zip包

#xxx.zip 压缩的包名
unzip xxx.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 xxx.zip.ZIP, period.

出现这种错误的原因

说明在文件上传或下载的过程中出现了文件丢失的情况

需要使用sftp或scp重新上传文件到服务器

然后使用unzip命令或jar命令解压压缩文件

解决过程

#方法一
unzip xxx.zip

#方法二
jar -xvf xxx.zip

总结

以上为个人经验,希望能给大家一个参考,也希望大家多多支持脚本之家。

您可能感兴趣的文章:
阅读全文