linux - 使用 fping 显示事件的主机

标签 linux

我正在使用 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/

相关文章:

c - 如何从文件在c中的路径获取文件所在的设备名称?

python - 导出 PATH 命令 - 'export PATH=~/anaconda3/bin:$PATH'

linux - make 命令和运行 build .sh 脚本之间的主要区别是什么?

linux - 无法创建 '/var/www/html/myproject/.git/index.lock'只读文件系统

linux - JRE (sun 1.6 21) 在 Linux Debian 5 上因 SIGBUS 而崩溃

linux - 使用linux查看目录中最大的文件?

linux - 如何从包含 content/u02/app/oracle-1/product/12.2.0/db_1 :N to/u01/app/oracle/product/12. 2.0/db_1:Y 的文件中替换整行

linux - 跟踪 Linux 操作系统上运行的应用程序的外设交互

java - Debian 将 spring boot 应用程序作为服务执行 : service not found

linux - 如何计算 CSV 文件中一列的平均值?