4th June 2010
in
Networking, cli
If you are on a LAN and wish to find out which computers in it currently have access to that certain LAN, you can use the following command:
for ip in $(seq 1 254); do ping -c 1 192.168.1.$ip>/dev/null; [ $? -eq 0 ] &[...]
Tags: LAN, ping
8 Comments
25th November 2008
in
Networking, cli
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; done
[...]
Tags: ping
No Comments