Monday, February 02, 2009

Pipe Viewing

Found an article that seems to help show the progress of piping things from place to another in nix.

Example 1 (From Article)
To know the progress of this pipe command: compress this log
$ gzip -c access.log > access.log.gz
You Run
$ pv access.log | gzip > access.log.gz
611MB 0:00:11 [58.3MB/s] [=> ] 15% ETA 0:00:59

Example 2 (From Article)
If you wish to see more details
$ pv -cN source access.log | gzip | pv -cN gzip > access.log.gz
source: 760MB 0:00:15 [37.4MB/s] [=> ] 19% ETA 0:01:02
gzip: 34.5MB 0:00:15 [1.74MB/s] [ <=> ]



How to get It?
Course to have that nice command, make sure you either get the latest tar ball or run some installing utility like this.
$ sudo aptitude install pv

Made by Andrew Wood

No comments: