Help us understand the problem. What is going on with this article?

進捗確認しながらtarで圧縮/解凍

More than 1 year has passed since last update.

よく使うけど、結構ぐぐるので、メモ

アーカイブ

圧縮はしない
元々圧縮されている画像ファイルとかをまとめるときに使う

$ tar cf data.tar data/

進捗を表示

$ tar cf - data/ | pc > data.tar
41MiB 0:27:21 [ 196KiB/s] [                                        <=>               ]

pvsオプションをつけると残り時間とかを表示してくれる

$ tar cf - data/ | pv -s $(du -sb data | awk '{print $1}') > data.tar
7.76MiB 0:00:42 [ 172KiB/s] [>                                        ]  0% ETA 22:20:37

圧縮

jオプションをつけると、bzip2で圧縮

$ tar jcf data.tar.gz2 data/

進捗を表示

$ tar cf - data/ | pv | bzip2 > data.tar.bz2
$ tar cf - data/ | pv -s $(du -sb data | awk '{print $1}') | bzip2 > data.tar.bz2

解凍

$ tar xf data.tar

進捗を表示

$ pv data.tar | tar xf -
Why do not you register as a user and use Qiita more conveniently?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away