One of our earlier articles explores tools on Linux to view the progress of commands like cp and mv. Coreutils Viewer (cv) is a utility that takes it to the next level by adding support for commands like rm, dd and even the progress of browser downloads.
cv supports all basic utilities in coreutils package. It is written in C and shows the progress as percentage. cv works by scanning /proc for commands that it supports, checks directories fd and fdinfo for opened files and seek positions and finally reports the progress for the largest file.
List of supported commands:
cp mv dd tar gzip gunzip cat grep fgrep egrep cut sort xz md5sum sha1sum sha224sum sha256sum sha384sum sha512sum
The author has plans to support the following:
- Progress bar
- Estimated time
- top-like mode with more accuracy
Run the following commands to compile and install cv:
$ git clone https://github.com/Xfennec/cv.git $ cd cv $ make $ sudo make install
- Run cv
- Monitor all current and upcoming instances ofcoreutils commands in a simple window
$ watch cv -q
- See Firefox download progress
$ watch cv -wc firefox
- Look at your Web server activity
$ cv -c httpd
- Launch andmonitor any heavy command using $!
$ cp bigfile newfile & cv -mp $!
Syntax: cv [-qdwmM] [-W secs] [-c command] [-p pid] -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) -c --command cmd monitor only this command name (ex: firefox) -p --pid id monitor only this process ID (ex: `pidof firefox`) -v --version show program version and exit -h --help display this help and exit
On GitHub: Coreutils Viewer
Pipe Viewer (pv) is a similar utility which can be used to monitor the progress of data through a pipeline. It gives a visual indication of how quickly data is passing through, how long it has taken, how near to completion it is, and an estimate of how long it will be until completion. pv works for two processes at a time.
Webpage: Pipe Viewer