我正在使用 fping 来显示事件主机的地址 ip,如下所示: 代码:
fping -A -d -a -q -g 192.168.1.0/24>file.txt
结果是:
box.home (192.168.1.1)
set-top-box41.home (192.168.1.10)
pc38.home (192.168.1.11)
pc43.home (192.168.1.12)
pc39.home (192.168.1.15)
我的问题是此命令显示此主机并需要大约 28 秒才能停止运行。我不知道如何在显示主机后停止此命令。 请帮我。 预先感谢您的回答
最佳答案
您可以通过添加额外的标志来加速您的网络扫描:
fping -A -d -a -q -g -a -i 1 -r 0 192.168.1.0/24
−i n The minimum amount of time (in milliseconds) between sending a ping packet to any target (default is 25).
−r n Retry limit (default 3). This is the number of times an attempt at pinging a target will be made, not including the first try.
如果 n
< 10,您需要成为 root。
关于linux - 使用 fping 显示事件的主机,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37301094/