解压缩多部分文件 - 坏zipfile偏移量(本地标题sig):4

时间:2016-04-23 07:21:32

标签: zip unzip

我有一个13 GB的文件,在Winzip(Windows 7)中使用martipart功能进行了平均分割。

我将文件上传到Linux服务器,我正在尝试将multipart文件合并到单个文件中。但我正在运行以下错误。

分割后的文件,

  total 9646432
  -rw-r--r-- 1 root root 730000000 Apr 14 20:57 file.z01
  -rw-r--r-- 1 root root 730000000 Apr 14 20:07 file.z02
  -rw-r--r-- 1 root root 730000000 Apr 14 20:01 file.z03
  -rw-r--r-- 1 root root 730000000 Apr 14 16:30 file.z04
  -rw-r--r-- 1 root root 730000000 Apr 14 16:24 file.z05
  -rw-r--r-- 1 root root 730000000 Apr 14 16:14 file.z06
  -rw-r--r-- 1 root root 730000000 Apr 14 16:08 file.z07
  -rw-r--r-- 1 root root 730000000 Apr 14 15:51 file.z08
  -rw-r--r-- 1 root root 730000000 Apr 14 15:46 file.z09
  -rw-r--r-- 1 root root 730000000 Apr 14 15:32 file.z10
  -rw-r--r-- 1 root root 730000000 Apr 14 15:27 file.z11
  -rw-r--r-- 1 root root 730000000 Apr 14 15:20 file.z12
  -rw-r--r-- 1 root root 730000000 Apr 14 14:28 file.z13
  -rw-r--r-- 1 root root 349166077 Apr 14 21:00 file.zip

服务器中的命令,

 #zip file.zip

我遇到了错误,

Archive:  file.zip
warning [file.zip]:  zipfile claims to be last disk of a multi-part archive;
attempting to process anyway, assuming all parts have been concatenated
together in order.  Expect "errors" and warnings...true multi-part support
doesn't exist yet (coming soon).
 file #1:  bad zipfile offset (local header sig):  4

我已经测试了27MB的测试文件,

 #ls
test.z01  test.z02  test.z03  test.z04  test.z05  test.zip


 [tbabu@fgtd-301705-130558-app001 .tbabu]$ unzip test.zip
Archive:  test.zip
warning [test.zip]:  zipfile claims to be last disk of a multi-part archive;
attempting to process anyway, assuming all parts have been concatenated
together in order.  Expect "errors" and warnings...true multi-part support
doesn't exist yet (coming soon).
file #1:  bad zipfile offset (local header sig):  4
file #2:  bad zipfile offset (local header sig):  207105
file #3:  bad zipfile offset (local header sig):  209345
..
..
file #302:  bad zipfile offset (lseek):  2924544
file #303:  bad zipfile offset (lseek):  2940928
..
..
..
inflating: en_US/1/2.zip
..
..
..

我能够在测试中合并文件,尽管我得到了上面的消息。

为什么不使用13Gb文件??

非常感谢协助。

2 个答案:

答案 0 :(得分:7)

基于cat的解决方案对我不起作用,但使用zip -F file.zip --out file-large.zip然后unzip file-large.zip合并文件确实有效。

答案 1 :(得分:3)

你可以尝试

public CustomGridViewAdapter(Context context, int layoutResourceId,
                             ArrayList<HashMap<String, String>> nameList) { 
    ....
}