fping命令来源于ping命令,但比ping命令更加高效,请简介fping命令的使用方式。
东方不败
举例说明fping命令的使用方式吧,如下所示:
$ fping gitlab.com gitlab.com is alive $ fping gitlab.com -A 35.231.145.151 is alive $ fping gitlab.com -A -a 35.231.145.151
另外还可以批量进行fping操作,比如自定义一个文件,把需要ping的域名输入进去,每行一个,然后如下操作即可:
$ fping -f hostnames.txt gitlab.com is alive ruby.org is alive python.org is alive
题外话,如何安装fping命令,Ubuntu操作系统下:
$ sudo apt-get install fping
Mac OS操作系统下使用,Homebrew安装fping即可(如何安装Homebrew查看这里):
$ brew install fping
CentOS下,使用yum即可安装:
$ yum install fping