Use the commands Linux
progress instead of dumbfound commands to pursue progress. These utilities give you progress bars for commands that do not normally have. The estimated time to completion is also displayed.
If you're on a long-haul flight on a plane with no video screens in the backrests, it's not easy to tell how far you are on your journey. You know when you took off. You know how long the flight is expected to last. But how do you know if you're on the right track, on time or far behind schedule? If you do not want to watch the movie during the flight, you can usually switch your video screen so that a map showing the position of your aircraft is displayed on it. You also get some statistics, eg. Eg the expected time of arrival (ETA).
Starting a command through the terminal window can sometimes feel like a long haul flight without a video screen. You have no clues as to whether everything is fine or whether the process has come to a standstill or how close he is to graduation. A flashing cursor is not very informative.
progress give you some statistics and a little visual feedback. You can see how close the process is to completion. That means you get an ETA for your running processes. Compared to staring at a cursor, that certainly wins.
You must install
pv on Ubuntu, use this command: [1
pv install on Fedora, use this command:
sudo dnf install pv  sudo dnf install pv in a terminal window " width="646" height="57" src="/pagespeed_static/1.JiBnMqyl6S.gif" onload="pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);" onerror="this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);"/>
pvon Manjaro too install, use this command:sudo pacman -Syu pv
pvstands for pipe viewer. Piping must be included somewhere in the command. Here is an example in which we pass an ISO image through
zipto create a compressed ISO zip file.
To slow down the commands so that a screenshot can be taken, some of the files in the examples used for this article were stored on an old, slow external USB stick called SILVERXHD.pv /media/dave/SILVERXHD/gparted-live-1.0.0-1-amd64.iso | zip> gparted.zip
pvis displayed in the bottom line of the display.
The following information is displayed from left to right:
- The data transferred so far.
- The time elapsed so far.
- The data transfer rate (throughput).
- A progress bar and percent graduation.
- Estimated time remaining until completion.
Copying a file with pv
Copying a file with output from
pv Use this command:
pv /media/dave/SILVERXHD/gparted-live-1.0.0-1- amd64.iso> gparted.iso
Copying the file displays a progress report.
Copying several files with pv  To copy several files and folders with
pv we need to do a little trick. We use
tar to move the files for us.
tar -c help-files / | pv | tar -x -C Documents /
tar -c help files / part of the command instructs
tar to create
- c ) an archive of the files in the folder help-files. This is passed through
pv so we get an indication of progress. It is then routed back to
tar for the last part of the command. The archive is extracted (
-x ) and the directory is changed before being extracted into documents ([19459009-C
So the files and folders that are in the help files are copied with a progress bar to the folder "Documents".
The output differs slightly this time.
There will be no ETA. The progress bar now displays a motion indicator. This shows that the process is active, but does not grow like a traditional progress bar from left to right.
pv is limited to the display of information that can be extracted from the process to be submitted.
Creating an archive with pv and tar
Copying files with
tar does not leave an archive file. A kind of "virtual" archive is created by
tar which is returned directly to
tar to extract the files. If our goal is to copy files, this is achieved. But what if we want to create an archive file?
We can still use
tar to create an archive file and get a progress report from
pv . The options used with
-c (create archive),
-z (compress with gzip), and
-f (filename of the archive).
Note that we use
- as the file name, which causes
tar to use stdout and writes its output to the terminal window. This output is not displayed as it is directed by
The actual name of the archive is the file name to which the output of
pv is directed. In this case it is "help-files.tgz".
tar -czf - ./help-files/ | pv> help-files.tgz
We get the same progress bars as before, and the archive file is created for us.
RELATED: Compressing and Extracting Files Using the tar Command on Linux
The options for the pv display
You can select a number of options Use this option with
pv to change the details of the report.
If you use one of these options, all other options will be disabled. So, if you want to use three of the display options, you must specify these three options.
The use of
pv without options corresponds to the use of
- -p : Display of percentage completed. This is the progress bar and percent completion.
- -t : Display of the elapsed time .
- -e : Display of ] ETA .
- -r : Display of the rate of the data transmission.
- -b : Display of the byte count (previously transmitted data).
- -n : Displays the percentage as integer . This outputs the completed percentage as an integer with each new update in a new row.
Repeat the last command and submit option
-p (completed percentage) to
tar -czf - ./help-files/ | pv - p> help-files.tgz
Disables all other display options.
pv provides only the percentage completion element.
pv does not receive a percentage completion count of
tar the progress bar is replaced by a movement indicator. There is no percentage.
Using pv with wc
We can use pv
to pass a text file (or files) in
wc then counts the carriage returns, characters and words and
pv gives us a progress report.
Here we redirect all ".page" files to the pipeline directory of help files in
wc is completed, we can see the number of line breaks (lines), characters, and words from all the ".page" files in the help-files folder. 
Installing the progress command
outputs the same useful information as
pv . However, it does work with a bunch of Linux commands.
progress in Ubuntu, use this command:
sudo apt-get install progress
to install progress in Fedora, use this command:
sudo dnf install progress
progress in Manjaro, use this command:
sudo pacman -Su progress
The progress of the commands works with
progress in a terminal window and press Enter, you will see a list of commands that will work with
progress .  progress
Using Progress With Pipes
There are two techniques used to monitor commands with
progress The first is the use of pipes.
tar is in the list of supported commands that can monitor
progress so let's use
tar .  The options we use are the default options
-c (create archive),
-z (compress with gzip) and
We derive this from
Progress and use the
-m (monitor) option to continue
progress reports on the process until it is completed.
tar -czf help.tgz ./help-files/ | progress -m
The terminal window displays the progress of the command
tar when creating the archive.
During processing, each file is listed with the following information:
- The process ID.
- The process name.
- percentage complete.
- Processed data and total file size.
- Data rate (throughput).
- Estimated time remaining (ETA).
You may see a second record. This first record is for
tar . The second is for
gzip to perform the compression. Since
gzip is included in the list of supported commands,
progress is reported about it.
Using progress in continuous monitoring mode
You can use
progress in Continuous real-time monitoring mode with the -M option (monitoring).
Type the following command in a terminal window:
progress reports that no commands are running for monitoring. However, they do not return to the command line.
progress waits until a command is launched that it can monitor. It then automatically starts reporting.
In another terminal window, type the command that specifies commands that progress can monitor.
We will use
cat . Commands that finish too fast are not registered for
progress so we list the contents of a very long text file.
The terminal window with
progress displays statistics for the command
cat running and works towards the conclusion.
Cat stops listing the file
progress returns to the wait state.
Each time one of the commands is executed it can report that it is performing a large task
Progress automatically monitors and reports them.
That's pretty neat.
Running command is doing, and pause your cursor with
progress [1 9459010].