Linux system administrators need to perform real-time monitoring of commands so that they know that the commands have been executed successfully, rather than being suspended. Here's how to use the PV command to monitor the completion of Linux commands.
Linux command does not usually progress and provide relevant information, and this information is particularly important, especially when you have limited time. However, this does not mean that you are helpless —— now there is a command, pv, which displays the progress of the command currently executing on the command line. We will discuss it in this article and illustrate its features with a few simple examples.
PV Commands
PV Developed by Andrew Wood, short for Pipe Viewer, which means to display information about the progress of data processing through pipes. This information includes the time that has been spent, the percentage of completion (shown by the progress bar), the current speed, the total transmitted data, and the estimated time remaining.
<;To use PV, you need to fit the appropriate options and place it in the pipeline between the two processes. The standard input of the command will be passed in via the standard output, and the progress will be output to the standard error output. ” The above explanation comes from the help page for the command.
Download and Install
Debian-based operating systems, such as Ubuntu, can simply install PV using the following command:
sudo apt-get install pv
If you are using other distributions, you can install PV on your system using the respective package management software. Once the PV is installed you can use it in a variety of situations (see below). Note that all the examples below use pv 1.2.0.
Features and Usages
Most of the usage scenarios we use (users who use the command line on linux) use commands that copy movie files from a USB drive to your computer. If you use cp to accomplish the above tasks, you will not know what is going on until the entire copying process ends or an error occurs.
However, the pv command is very helpful in this scenario. For example:
pv /media/himanshu/1AC2-A8E3/fNf.mkv & gt; ./Desktop/fnf.mkv
Output follows:
pv- Copy So, as you can see, this command shows a lot of useful information about the operation, including the amount of data that has been transferred, the time it took, the transfer rate, the progress bar, the percentage of progress, and the time remaining.
The pv command provides a variety of display option switches. For example, you can use -p to display the percentage, -t to display the time, -r to indicate the transfer rate, and -e to represent eta (LCTT). The good thing is that you don't have to remember one option, because the default options are enabled. However, if you only need one of these information, you can complete the task by controlling these options.
Previous 12 Next Total 2 Pages
Learning to use Linux is actually getting familiar with the various Linux operations. Of course, the
In Ubuntu system, you can use the tab key to automatically complete the command, but in other Linux
In order to more convenient Internet access, we usually let our computer bind the network card. Howe
Linux system If you want to understand the load between multiple database servers, then you will use
How to configure Mentohust network on Ubuntu
Linux mysql how to change the root password
How Linux uses ssh to transfer files to FTP space
Steps to install Kali system on a virtual machine
Steps to install arping on Fedora 18
How to turn off the scp and sftp commands in Linux
How to solve the problem that Linux does not limit the Limit value after opening SSH
Ubuntu14.04 wake up sleep after the mouse and keyboard stuck how to solve
What should I do if there is a mount:Structure needs cleaning error in Linux?
Enable IIS6 GZIP, improve website open speed
AutoCAD Drawing Computation 2D Graphics Area Tutorial
Windows8.1 Update restores the modern toolbar tricks
Windows XP no longer has memory read and write errors.
Misunderstandings when users optimize Vista systems
Microsoft officially announced Windows 10 upgrade release URL
How to make win10 never black screen