7zaを使用して圧縮されたファイルは、zipユーティリティを使用して解凍できません。

7zaを使用して圧縮されたファイルは、zipユーティリティを使用して解凍できません。

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で生成されたファイルを解凍できないという意味ですか?

ベストアンサー1

unzipこの特別な場合は、;を使用してファイルを抽出することはできません。7za抽出して使用する必要があります。

デフォルトで7za作成7z形式ファイル。 ;を使用して抽出できるzip形式のアーカイブを作成することもできますunzip。これを行うには、.zip拡張子を使用してアーカイブを指定するか、次のようにタイプを指定します-tzip

7za a -tzip test.war ...

それからtest.warunzip

JavaEE WARファイルを作成する場合は、.NET Frameworkjarではなくこのツール(またはビルドツール用のプラグイン)を使用する必要があります。zip7za

おすすめ記事