Linux下unzip解压文件时报错:End-of-central-directory signature not found.

在linux上下载好coco20017数据集,解压时候:

year=2017
unzip train{$year}.zip
unzip val{$year}.zip

报错:

Archive:  train2017.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 train2017.zip or
        train2017.zip.zip, and cannot find train2017.zip.ZIP, period.

解决办法:
不使用 unzip 命令解压zip 文件,改用 jar 解压文件
用fastjar去解压。

1 在终端打出sudo apt-get install fastjar下载fastjar

2.jar xvf 目录/**.zip  

原因:
一般在linux下解压zip文件,直接用系统默认的 unzip命令
但是如果压缩文件.zip是大于2G的,那unzip就无法使用了,就会报出cannot find or open的错误

你可能感兴趣的:(笔记,linux,大数据,运维)