Many Linux commands like cp, mv, rm, and others that perform progressive tasks lack a built-in mechanism or option to display a progress bar. However, a verbose mode is present that can show the detailed insight of each action, but a progress indicator would have been better.
The rsync command has the built-in capability to show a progress bar. It’s handy for tasks like syncing files from local to remote systems or copying files between directories. When you’re doing these tasks, you can use “rsync
” with the “--info=progress2
” flag to see the progress bar.
Additionally, the dd command, which is used for creating backups, bootable USB devices, data compression, and more, has a built-in “status=progress
” option to show a progress bar.
However, for any other command, you won’t have a built-in option to enable the progress bar. So, you can either live in hope for your command completion or use the incredible command-line tool mentioned in this article to display the progress bars for nearly all Linux commands.
Show the Progress of Linux Commands
Progress is a fantastic tool to display the progress of various commands such as cp, mv, dd, tar, cat, rsync, scp, fg, cut, adb, gzip, gunzip, bzip2, xz, 7z, 7za, zip, unzip, and many more.
The major Linux distribution repository includes this popular tool, making it easy to install using the default package manager.
# On Debian, Ubuntu, Kali Linux, Linux Mint, Zorin OS, Pop!_OS, etc.
$ sudo apt install progress
# On Red Hat, Fedora, CentOS, Rocky Linux, AlmaLinux, etc.
$ sudo dnf install progress
# On Arch Linux, Manjaro, BlackArch, Garuda, etc.
$ sudo pacman -S progress
When you are done installing, you can just issue the command without any options to display the list of supported commands that it can provide a progress bar for.
$ progress
Output:
If you plan to perform any tasks with the Linux commands listed above and wish to monitor their progress, simply open your terminal and run the “watch
” command. For example, the first command below will copy a file from one destination to another, and I’d like to track its progress by using the “progress
” command with “watch
” for real-time updates.
$ cp specialfile /mnt/
$ watch progress
Output:
Instead of opening a new terminal tab to display a progress bar, you can append the following command (highlighted in green) at the end of any supported commands for an immediate display of a progress bar upon execution.
$ cp specialfile /mnt/ & progress --monitor --pid $!
Output:
Final Word
The progress tool is an amazing tool to display the progress bar; even with commands like “rsync
” and “dd
” that offer built-in options to show progress, I often forget to include it. So later, when I want to check their progress, I use the progress tool.
It’s an excellent and astonishing productivity tool that developers, network engineers, or sysadmins should definitely use. Lastly, if you have any questions or queries related to the article, feel free to tell us in the comment section.
Till then, peace!
Join The Conversation
Users are always welcome to leave comments about the articles, whether they are questions, comments, constructive criticism, old information, or notices of typos. Please keep in mind that all comments are moderated according to our comment policy.