Friday 5 March 2010

Finding all hosts on a network subnet (Windows Cygwin Bash)

Just run the below in Cygwin bash command shell:

for ip in $(seq 1 254); do ping -w 20 -n 1 192.168.1.$ip>/dev/null; [ $? -eq 0 ] && echo "192.168.1.$ip UP" || : ; done

No comments:

Post a Comment