cp、mvの現在状況を確認出来る『cv』コマンド
いままで、パフォーマンスやネットワークのモニタリングコマンドについて扱ってきたが、今回はcpやmvプロセスのモニタリングコマンド『cv』について紹介する。
このコマンドは、OS上で実行されているcpやmvの実行状況(何%終了したか等)を確認することが出来る。
1.インストール
以下のコマンドを実行し、『cv』コマンドをインストールする。
1 2 3 4 | $ git clone https: //github .com /Xfennec/cv $ cd cv $ make $ sudo make install |
これでインストールできた。
2.コマンド実行
インストールは出来たので、次は実際にコマンドを実行してみよう。
まずはヘルプの内容を出力。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | $ $ cv --help cv - Coreutils Viewer --------------------- Shows running coreutils basic commands and displays stats. Supported commands: cp mv dd tar gzip gunzip cat grep fgrep egrep cut sort Usage: cv [-vqwmMh] [-W] [-c command ] - v --version show version -q --quiet hides all messages -d --debug shows all warning /error messages -w --wait estimate I /O throughput and ETA (slower display) -W --wait-delay secs wait 'secs' seconds for I /O estimation (implies -w, default=1.0) -m --monitor loop while monitored processes are still running -M --monitor-continous like monitor but never stop (similar to watch cv) -h --help this message -c -- command cmd monitor only this command name (ex: firefox) |
ほうほう、どうやらモニタモードとか、監視するコマンドの指定を出来るようだ。
実際にcpコマンドを叩いて、このコマンドを実行してみよう。
1 | $ cv |
現在のcpコマンドの進捗具合が表示された。
とはいえ、これだと一回こっきりなのでモニタリングモードで継続的に監視してみよう。
1 | $ cv -m |
うん、これで継続監視が出来るようになった。
cpとかやったはいいけど、いつ終わるのかわからなくなった場合に重宝するかも?
Pingback: 【コンピューター】 【パケ死注意】ドコモやソフトバンク、パケット代青天井の「スピードモード」「快適モード」加入を割引の条件にしていることが判明 | BUZZAP!(バザップ!) 2014年09
Pingback: cp、mvの現在状況を確認出来る『cv』コマンド | 俺的備忘録 〜なんかいろいろ〜 | unix情報ポータル