Created
November 14, 2018 13:53
-
-
Save Pouya-moh/062709fab65542033093eeec26e43bdd to your computer and use it in GitHub Desktop.
ping all addresses in current subnet in loop instead of ping -b
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ time ( s=192.168.0 ; for i in $(seq 1 254) ; do ( ping -n -c 1 -w 1 $s.$i 1>/dev/null 2>&1 && printf "%-16s %s\n" $s.$i responded ) & done ; wait ; echo ) | |
## credit: https://superuser.com/a/487014/195348 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment