标签:
<1>
d211 admin # for i in {3..254} ; do ping -c 1 192.168.1.$i &>/dev/null && echo 192.168.1.$i is alive ;done
192.168.1.5 is alive
192.168.1.7 is alive
<2>
fping -a -g 192.168.5.1 192.168.5.177 -s -n >lele.txt
-a Show systems that are alive.
-g Generate a target list from a supplied IP netmask, or a starting and ending IP. Specify the net mask or start/end in the targets portion of the command line.
ex. To ping the class C 192.168.1.x, the specified command line could look like either:
fping -g 192.168.1.0/24 or fping -g 192.168.1.0 192.168.1.255
-s Print cumulative statistics upon exit. -n Same as -d.
-d Use DNS to lookup address of return ping packet. This allows you to give fping a list of IP
addresses as input and print hostnames in the output.
标签:
原文地址:http://www.cnblogs.com/itcomputer/p/4645019.html