In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly explains "how to use Coreutils Viewer to display the running progress of commands in the Linux system". Interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn how to use Coreutils Viewer to display the progress of commands in the Linux system.
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. The beauty of cv is that it can be used with other Linux commands, such as the watch and Icano redirection commands as you know them. In this way, you can use it in scripts, or in any way you can think of, and don't let your imagination bind you.
Installation
You can download the required source files from cv's github repository. After downloading the zip file, extract it and go to the unzipped folder.
This program requires ncurses library. If you have already installed ncurses on your Linux system, then the installation process of cv is so easy for you.
Compile and install through the following two simple steps.
The code is as follows:
$make
$sudo make install
Run cv
To run cv, just enter this command on the command line, just like any other program. If you don't execute make install and choose to run it from the current directory, you can run the following command:
The code is as follows:
$. / cv
Otherwise, run the following command.
The code is as follows:
$cv
If no core component command is running, then the cv program exits and tells you that there are no core component commands running.
To use this program effectively, run a core component program on your system. In this example, we will use the cp command.
When you copy a typed 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 other commands. A useful option is to let you know the estimated remaining time when copying or moving large files.
Add the-w option and it will show you the estimated remaining time.
The code is as follows:
$cv-w
Try to add more command options. Add additional options as follows:
The code is as follows:
$cv-wq
Cv and watch commands
Watch is a program that runs programs periodically and displays output. Sometimes, you may want to keep looking at the operation of the command rather than storing the results of cv in a log file. In this case, watch will come in handy and can be used with cv.
The code is as follows:
$watch cv-qw
This command will display examples of all running core component commands. It also shows progress and estimated completion time.
View the output in the log file
As promised, you can use cv to redirect its output to a log file. This feature is especially useful when commands run too fast to see anything meaningful.
To see the progress in the log file, you just need to redirect the output, as shown below.
The code is as follows:
$cv-w > > log.txt
To see the output of this command, open the log file with your favorite text editor, or use the cat command, like this:
The code is as follows:
$cat log.txt
Get help
If you are stuck anywhere, you can always get help by looking at the man page or using the help option. To get help, you can use the cv command with the-h option.
The code is as follows:
$cv-h
If you need more details, the manual page is a great place to go.
The code is as follows:
$man cv
However, to get the above man pages, you must execute make install to install cv.
At this point, I believe you have a deeper understanding of "how to use Coreutils Viewer to display the progress of commands in the Linux system". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.