Why not login to Qiita and try out its useful features?

We'll deliver articles that match you.

You can read useful information later.

0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

ファイルの圧縮・解凍一覧

Last updated at Posted at 2020-08-26

良く使う圧縮/解凍コマンドのまとめ

tar.gz

tar zcvf hoge.tar.gz hoge  # 圧縮
tar zxvf hoge.tar.gz hoge  # 解凍

zip

zip   hoge.zip hoge  # 圧縮
unzip hoge.zip hoge  # 解凍

gz

gzip   hoge     # 圧縮
gunzip hoge.gz  # 解凍

並列処理 (tar.gz) 解凍は、あまり高速化できないらしい。

オプションの順番の意味するところがまだよく分かっていない。

tar zcvf --use-compress-prog=pigz hoge.tar.gz hoge  # 圧縮
tar  xvf hoge.tar.gz      --use-compress-prog=pigz # 解凍

メモ

圧縮ファイルが正常じゃない時、解凍時にエラーが出るが、このエラーメッセージはログに書き出せる。ので、大きいファイルを解凍するときには、nohupでログを残すと良い。

nohup tar zcvf --use-compress-prog=pigz hoge.tar.gz hoge > log.hoge # 圧縮
nohup tar xvf hoge.tar.gz       --use-compress-prog=pigz > log.hoge # 解凍
0
0
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

Qiita Advent Calendar is held!

Qiita Advent Calendar is an article posting event where you post articles by filling a calendar 🎅

Some calendars come with gifts and some gifts are drawn from all calendars 👀

Please tie the article to your calendar and let's enjoy Christmas together!

0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?