我有一个ZIP档案,里面有一些照片。问题是,我不能从这个档案中解压缩所有的文件。
解压缩命令:
unzip archive.zip
Archive: archive.zip
mapname: conversion of failed
mapname: conversion of failed
mapname: conversion of failed
mapname: conversion of failed
mapname: conversion of failed
mapname: conversion of failed
mapname: conversion of failed
mapname: conversion of failed
mapname: conversion of failed
mapname: conversion of failed
mapname: conversion of failed
mapname: conversion of failedZIP归档文件列表(每个文件都没有名称.):
unzip -l archive.zip
Archive: archive.zip
Length Date Time Name
--------- ---------- ----- ----
61684 03-07-2019 10:01
55901 03-07-2019 10:01
71678 03-07-2019 10:01
69684 03-07-2019 10:01
57131 03-07-2019 10:01
95984 03-07-2019 10:01
69633 03-07-2019 10:01
73401 03-07-2019 10:01
79661 03-07-2019 10:01
53126 03-07-2019 10:01
68691 03-07-2019 10:01
66707 03-07-2019 10:01
--------- -------
823281 12 files解压缩测试命令:
unzip -t archive.zip
Archive: archive.zip
testing: OK
testing: OK
testing: OK
testing: OK
testing: OK
testing: OK
testing: OK
testing: OK
testing: OK
testing: OK
testing: OK
testing: OK如果我尝试解压缩的管道命令,那么我有一个JPEG文件,其中包含所有的照片存档。
unzip -p archive.zip | cat > $(date +%s%3N).jpeg拜托,有机会像这样解压缩档案吗?
已更新
当在HEX编辑器中显示ZIP存档时,我看到归档文件没有设置名称。在图像上是ZIP文件的末尾,它包含关于每个档案文件的信息。图像上选定的Bytes表示一个归档文件的信息容器。

发布于 2019-03-07 12:08:45
首先,shell中的区域设置不应该是ASCII,我认为它是一个简单的Linux用户。
locale可能是档案馆的编码。对于ASCII字母,前面的nul字节将解释空字符串。
unzip -O UTF-16BE -l archive.zip
unzip -O UTF-16BE archive.zip有些编程要求不同,要么修补名称,要么遍历条目,然后选择自己的名称来存储每个文件。Java ZipInputStream就可以了。
我认为是这样的,有人编程来压缩目录,但忘了设置条目的文件名。
https://stackoverflow.com/questions/55043193
复制相似问题