我使用名为test.war的7za命令创建了这个文件
# file test.war
test.war: 7-zip archive data, version 0.4我试图在另一台RHEL机器中使用命令解压缩该文件:
# unzip test.war
Archive: test.war
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 test.war or
test.war.zip, and cannot find test.war.ZIP, period.这是否意味着我无法解压缩使用7zip创建的文件?
发布于 2016-11-13 13:25:28
在这种情况下,不行,您不能使用unzip解压缩文件;您需要使用7za来解压缩它。
默认情况下,7za创建7z格式档案。它还可以创建压缩格式的存档,可以使用unzip提取;为此,可以指定带有.zip扩展的归档,也可以使用-tzip指定类型:
7za a -tzip test.war ...这将产生一个test.war文件,该文件可以用unzip提取。
注意,如果您正在创建一个JavaEE WAR文件,您应该无论如何使用jar工具(或者为您的构建工具提供适当的插件),而不是使用zip或7za。
发布于 2016-11-13 11:34:33
https://unix.stackexchange.com/questions/322936
复制相似问题