LoginSignup
9
5

More than 3 years have passed since last update.

linux で 4GB 以上の zipファイルを解凍する方法

Last updated at Posted at 2019-11-05

追記

jar xvf hogehoge.zip

安心感を得るために v を付けて解凍の進捗を可視化してますけど, 邪魔なら V を消してjar xf hoge.zipにすればいいです.

の方を使うと7zで偶に遭遇するエラーも回避できそうです. 知らんけど

How to unzip files bigger than 4GB?


unzip コマンドは簡単で楽ちんですが, 4GBを超えると

rchive:  hogehoge.zip
warning [hogehoge.zip]:  5987253855 extra bytes at beginning or within zipfile
  (attempting to process anyway)
error [hogehoge.zip]:  start of central directory not found;
  zipfile corrupt.
  (please check that you have transferred or created the zipfile in the
  appropriate BINARY mode and that you have compiled UnZip properly)

と言われます.

なので別の方法で解凍しなきゃいけないわけですが, 調べると tar コマンドを使えだの jar でjavaでなんか解凍しろだの言っててよくわからん.

で, 一番簡単な方法を見つけたのでそれを紹介します.

一言で言うと 7z を使え です.

インストール

$ sudo apt update
$ sudo apt-get install p7zip-full p7zip-rar

解凍

$ 7z x hogehoge.zip

この方法なら大きいzipファイルも解凍出来ます.

他にもいろいろオプションで指定出来るっぽいので気になる人は各自で調べてみてください.

9
5
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
9
5