CV: Displays the progress of commands such as CP, MV, etc.
2014-07-14 by Toy Posted in Apps Edit on GitHub
Most of the commands in a Linux system are always the "silence is golden" rule, so we cp
don't see the so-called progress bar when we use the copy file. If you care about this, then use CV.
CV is the coreutils Viewer, which is capable of displaying the progress of transmitted data, including information such as percentage, size, and rate. CV supports basic commands in coreutils such as CP, MV, RM, DD, tar, and so on.
The source code for CVS is available from GitHub and needs to be compiled on its own.
CV: The command that displays the progress of the Linux command coreutils Viewer (
CV) is a simple program that can be used to display the progress of any core component commands (such as CP, MV, DD, tar, gzip, gunzip, Cat, grep, Fgrep, Egrep, cut, sort, XZ, exiting). It uses file description information to determine the progress of a command, such as the CP command.
CVThe beauty of this is that it can be used with other Linux commands, such as watch and I/O redirection commands you know. In this way, you can use it in scripts, or all the ways you can think of it, and don't let your imagination bind you. Installation
You can download the required source files from the CV GitHub repository. After downloading the zip file, unzip it and then go to the Unpacked folder.
The program requires ncurses library. If you already have ncurses installed on your Linux system, the CV installation process is as easy as it is for you.
Use the following two simple steps to compile and install.
- $ make
- $ sudo make install
Run CV
To run a CV, simply enter this command at the command line just like any other program. If you do not perform the make install and choose to run from the current directory, you can run the following command:
- $ ./CV
Otherwise, run the following command.
- $ CV
If no core component commands are running, then the CV program exits and tells you that no core component commands are running.
To use the program effectively, run a core component program on your system. In this example, we will use the CP command.
When you copy a file, you can see the current progress, shown as a percentage.
Add options to CV
You can also add several options to the CV command, just like any other command. A useful option is to let you know the estimated time remaining when copying or moving large files.
Add the- w option, which will help you to display the estimated time remaining.
- $ CV -W
Try adding more command options. Add other options like this:
- $ CV -Wq
CV and watch commands
Watch is a program that periodically runs programs and displays output results. Sometimes, you might want to keep a look at the command health and not store the results of the CV in a log file. In this case, watch will come in handy, and it can be used with CVS.
- $ watch CV -QW
This command will display an instance of all running core component commands. It also shows the progress and estimated time to complete.
View the output in the log file
As promised, you can use CV to redirect its output to a log file. This is especially useful when the command runs too fast to see any meaningful content.
To see the progress in the log file, you just need to redirect the output as follows.
- $ CV -w >> log. TXT
To see the output of the command, open the log file with your favorite text editor, or use the Cat command, like this:
- $ cat Log. TXT
Get help
If you are hindered anywhere, you can always get help information by looking up the man page or by using the assist option. For help information, you can use the CV command with the- h option.
- $ CV -H
If you need more details, then the manual page is a great place to be.
- $ mans CV
However, to obtain the above man pages, you must perform a make install to install the CV.
Yes! Now there's a great tool in your Linux toolbox. Do you learn? Try it out for yourself ~
CV: Show Linux Command Run progress