Progress – Tool to monitor progress of basic command in Linux
Progress is a command-line-based tiny tool which is formerly known as a Coreutils Progress Viewer. This tool is written in the C language. This command looks for the Coreutils basic command like cp, mv, dd, tar, gzip, cat, etc. which are currently running on the system and display the percentage of copied data. This tool can also show the estimated time and throughput and provide a “top-like” mode. This is a very light tool. Progress tool is available for Linux, FreeBSD, and macOS.
Installation of Progress tool
Now let’s see how we can install the progress tool on the system. We are going to use the system package manager to install the progress tool. Use one of the following commands according to your operating system:
For Deb-based systems (Debian, Ubuntu, Mint, etc.):
apt install progress
For Arch Linux:
pacman -S progress
dnf install progress
For Red Hat, CentOS:
yum install progress
For macOS with homebrew :
brew install progress
For macOS with MacPorts:
port install progress
Using progress tool
After successfully installing the progress tool now let’s see how to use the progress tool. To get the list of Coreutils commands for which the progress tool shows progress, just run the progress command:
Now let’s see by doing one operation how it works.
As we can see, the progress command shows the PID 3185 copying one file, and it is 26% completed. To display estimated I/O throughput and estimated remaining time of ongoing coreutils command use the -w option with progress command:
To continuously monitor the command without running the progress command again, and again, we can pipe progress command with -m option and $! Variable as follows:
cp Fedora-Workstation-Live-x86_64-34-1.2.iso ../ | progress -m $!
This will continuously show the status of the running command.
To watch all current and upcoming instances of coreutils commands in the simple window, use the following command:
watch progress -q
To monitor your download is progressing, you can use the following command:
watch progress -wc firefox
To monitor Web server activity, you can use the following command:
progress -c httpd
How does the progress tool work?
To collect the information this tool scans the /proc directory for coreutils commands, and then it searches for opened files in fd and fdinfo directories and then reports their status for the largest files. This is a very light tool and compatible with virtually any command.