Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get output of ping command without Ping statistics?

For example, in Windows 7 output of command

ping -n 1 ::1

is following:

Pinging ::1 with 32 bytes of data:
Reply from ::1: time<1ms

Ping statistics for ::1:
    Packets: Sent = 1, Received = 1, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 0ms, Maximum = 0ms, Average = 0ms

Is it possible to get output without Ping statistics (without the last four lines in this case or without two lines in case if destination host is unreachable)?

like image 335
valeryan Avatar asked Jun 12 '15 10:06

valeryan


People also ask

How do I get out of ping command?

To stop pinging, press Ctrl + C in the command prompt window.

What is ping test output?

A ping test is a method of checking if the computer is connected to a network. It also determines the latency or delay between two computers. It is used to ensure that a host computer which your computer tries to access is operating. A ping test is run for troubleshooting to know connectivity as well as response time.

How do I get a continuous ping?

Use the command "ping 192.168. 1.101 -t" to initiate a continuous ping. Again, replace the IP address with one specific to your device as needed. The -t can be placed before or after the IP address.

How do you ping 1000 times?

Type ping -l 1000 <default gateway address> where <default gateway address> is the default gateway address displayed above. For example, if the default gateway address was 192.168. 1.1, you would type ping -l 1000 192.168.


1 Answers

Maybe using this command:

ping -n 1 ::1 | find "string to search"
like image 104
iz25 Avatar answered Oct 08 '22 05:10

iz25