Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use prettyping in linux

2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

This article will explain in detail how to use prettyping in linux. The editor thinks it is very practical, so I share it with you as a reference. I hope you can get something after reading this article.

Ping must be familiar to everyone. We often execute this command when we want to know whether the network is open or not. However, the default ping command output is tedious. Therefore, some guy from abroad wrote the script prettyping.sh, which will not only add some color, but also show some pictures. Anyway, it just looks a little special.

Install Prettyping

As mentioned above, Prettyping is a green software and does not require any installation, just download the Prettyping binaries using the following command:

$curl-O https://raw.githubusercontent.com/denilsonsa/prettyping/master/prettyping

Place the binaries in $PATH (for example, / usr/local/bin):

$sudomv prettyping / usr/local/bin

Then give it executable permissions:

$sudochmod+x / usr/local/bin/prettyping

You can use it.

Make the output of ping clear and easy to read

After the installation is complete, you can view the output graphically by ping any host or IP address through prettyping.

$prettyping ostechnix.com

The output would look something like this:

If you execute prettyping without any arguments, it will run until it is interrupted by ctrl + c.

Because Prettyping is only an encapsulation of ordinary ping commands, the commonly used ping parameters are also valid. For example, use-c 5 to specify 5 times for a ping host:

$prettyping-c 5 ostechnix.com

Prettyping uses color output by default. If you don't like color output, you can add the-nocolor parameter:

$prettyping-nocolor ostechnix.com

Similarly, you can disable multi-color support with the-nomulticolor parameter:

$prettyping-nomulticolor ostechnix.com

Disable unicode characters using the-nounicode parameter:

Share a way to make Ping's output easier to read. Share a way to make Ping's output easier to read.

If your terminal doesn't support UTF-8, or if you can't fix the unicode font in your system, you can easily fix it by adding the-nounicode parameter.

Prettyping supports redirecting the output to a file, for example, executing the following command redirects the output of prettyping ostechnix.com to ostechnix.txt:

$prettyping ostechnix.com | tee ostechnix.txt

Prettyping also has many options to help you accomplish various tasks, such as:

Enable / disable delay legend (enabled by default)

Force output according to the format of the terminal (automatic by default)

Count the last n times of ping in the statistics (default 60 times)

Coverage for automatic detection of terminal size

Specify the awk interpreter path (default: awk)

Specify the ping tool path (default: ping)

Check the help documentation to learn more:

$prettyping-help

Although Prettyping doesn't add any additional features, I personally like these advantages of it:

Real-time statistics-all real-time statistics can be viewed at any time, and the standard ping command displays statistics only after the command has been executed.

Compact display-you can see a longer time span at the terminal.

Detect lost packets and display them.

This is the end of this article on "how to use prettyping in linux". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, please share it for more people to see.

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.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report