6 examples for ping
# Limit the number of times an address is pinged (4, in this case). ping -c4 www.example.com
# Pings an address 10.0.0.150 in this example appending a timestamp with an interval of 200 ms ping -i 0.2 10.0.0.150 | while read pong; do echo "$(date +%Y-%m-%d:%H:%M:%S:%N): $pong" ; done
# a corrected command to ping a host and make a beep at every response. Useful for troubleshooting when you re not in front of your screen. Corrected from other command in that the -a flag needs to happeb before the host of the machine to ping. ping -a google.com
# ping google.com and beep at every response. Useful for troubleshooting cables, when you aren't in front of your screen. ping google.com -a