23
26

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 5 years have passed since last update.

[Linux][shell] 時間がかかる処理の進捗(プログレスバー)を表示する

Last updated at Posted at 2016-08-09

TL;DR

時間がかかる処理の進捗を表示する方法のまとめ。
だいたい pv コマンド使えばよいです。

実行例

tar

tarの展開

tar.gz
$ pv test.tar.gz | tar zxf -
tar.bz2
$ pv test.tar.bz2 | tar jxf -

tarの圧縮

$ tar cf - ./test | pv | gzip -1 > test.tgz

dd

※ddのoutput先(下では/dev/sdXXX)はあくまでも例なのでコピペしないこと!

$ pv bigfile | sudo dd bs=4M of=/dev/sdXXX
実行例
$ pv XXX.image | sudo dd bs=4M of=/dev/sdXXX
 1.2GiB 0:04:33 [3.81MiB/s] [=======================>                                   ] 16% ETA 0:22:59

md5sum

$ pv bigfile | md5sum

MySQL

MySQLのリカバリの表示にもいけるらしい

mysqldumpリカバリの進捗を表示する - Qiita

参考

command line - How to check the progress of md5sum on many huge files? - Ask Ubuntu
Linux - pv コマンドで処理進捗状況表示! - mk-mode BLOG
Linuxでファイルコピー時に進捗状況を確認する6つの方法 | 俺的備忘録 〜なんかいろいろ〜
さらに仕事がダラけてしまったのでpvコマンドでプログレスバー - harry’s memorandum

23
26
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
23
26

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?