Kie*_*ran 6 zip terminal macos
预先感谢您的任何帮助。我正在尝试从 OSX 10.8.5 中的命令行解压缩多部分 zip 文件。
我使用创建了zipzip -s 800m foo.zip foo.mov
文件大小foo.mov为2.7GB。所以我有这些文件:foo.zip, foo.z01, foo.z02, foo.z03.
我尝试使用zip -s 0 foo.zip -O foo_unsplit.zip,但 foo_unsplit.zip 只有 1.6GB,并且在与 unzip 一起使用时出现以下错误。
error: invalid compressed data to inflate
Run Code Online (Sandbox Code Playgroud)
我也尝试使用cat Heritage.zip Heritage.z01 Heritage.z02 Heritage.z03 > Heritage_unsplit.zip但解压缩结果文件给出以下结果:
unzip Heritage_unsplit.zip
Archive: Heritage_unsplit.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 Heritage_unsplit.zip or
Heritage_unsplit.zip.zip, and cannot find Heritage_unsplit.zip.ZIP, period.
Run Code Online (Sandbox Code Playgroud)
有谁知道在命令行中解压缩多部分文件的方法。我的尝试是否犯了错误?
我假设 MacOS 版本之间的情况有所不同 - 我目前正在运行High Sierra 并且unzip仍然无法正确支持多部分 - 但我做了同样的技巧,cat但以相反的顺序,它起作用了。
即cat Heritage.z03 Heritage.z02 Heritage.z01 Heritage.zip > Heritage_unsplit.zip
然后unzip就可以了。
我遇到了一些如下错误,但文件是二进制的:
> unzip big.zip
Archive: big.zip
warning [big.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).
warning [big.zip]: 1073741824 extra bytes at beginning or within zipfile
(attempting to process anyway)
file #1: bad zipfile offset (local header sig): 1073741828
(attempting to re-compensate)
inflating: ...
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
7523 次 |
| 最近记录: |