在Linux上不使用`unzip`的解压缩文件,在Windows上已压缩的文件[关闭]

问题描述 投票:0回答:1

[在Red Hat Enterprise Linux(RHEL)中使用unzip压缩在Windows 10 64位系统上创建的8.8Gb zip文件时,出现错误bad CRC eb71d36a (should be b0968d02)。压缩文件中包含的单个文本文件确实被提取,但是已损坏。

我可以在具有7z的Windows 10 64位计算机上将完全相同的zip文件解压缩,没有任何问题,然后将该文件sftpscp解压缩到同一RHEL计算机上,就可以正常工作。但是,这不是一个可行的长期解决方案。

此错误的几乎相同的详细信息记录在以下网站上:

  1. https://bbs.archlinux.org/viewtopic.php?id=153011
  2. https://centos.org/forums/viewtopic.php?f=14&t=5451&sid=99b599f3615126e1dc48d671468336d8&start=10

他们俩似乎都在解压缩中记录了未解决的错误。

所以问题是:如何从RHEL bash shell中解压缩不使用unzip而在Windows 10 64位系统上压缩的大型zip文件?

我尝试了以下操作,这会显示错误:

$ gunzip -S .zip largefile.zip
gzip: largefile.zip: first entry not deflated or stored -- use unzip
$ jar -xvf largefile.zip
java.util.zip.ZipException: invalid compression method
        at java.util.zip.ZipInputStream.read(ZipInputStream.java:224)
        at java.util.zip.ZipInputStream.closeEntry(ZipInputStream.java:139)
        at sun.tools.jar.Main.extractFile(Main.java:1015)
        at sun.tools.jar.Main.extract(Main.java:924)
        at sun.tools.jar.Main.run(Main.java:264)
        at sun.tools.jar.Main.main(Main.java:1231)

Linux版本

$ lsb_release -a
LSB Version:    :core-4.1-amd64:core-4.1-noarch
Distributor ID: RedHatEnterpriseServer
Description:    Red Hat Enterprise Linux Server release 7.3 (Maipo)
Release:        7.3
Codename:       Maipo

解压缩版本

$ unzip -v
UnZip 6.00 of 20 April 2009, by Info-ZIP.  Maintained by C. Spieler.  Send
bug reports using http://www.info-zip.org/zip-bug.html; see README for details.

Latest sources and executables are at ftp://ftp.info-zip.org/pub/infozip/ ;
see ftp://ftp.info-zip.org/pub/infozip/UnZip.html for other sites.

Compiled with gcc 4.8.5 20150623 (Red Hat 4.8.5-4) for Unix (Linux ELF) on Apr 15 2016.
linux bash zip unzip rhel7
1个回答
0
投票

RHEL服务器上是否有7z?否则,您可以使用它来提取zip文件。

7z e archive.zip
© www.soinside.com 2019 - 2024. All rights reserved.