|
How to Ping all the hosts in hosts file in Linux |
|
|
|
|
Written by Amanatullah khalil
|
|
Saturday, 23 May 2009 |
|
Did you know you can ping all the hosts listed in the /etc/hosts file with one command? Do it with for i in `grep -v “^#” /etc/hosts | awk ‘{print $1}’`; do ping -c 1 -w 2 $i ; echo; doneTHanks to http://techgurulive.com/2009/04/24/how-to-ping-all-the-hosts-in-hosts-file-in-linux/
|