首页
Java
登录
6mi
u
盘
搜
搜 索
Java
centos下批量ping检测IP是不是通的
centos下批量ping检测IP是不是通的
xiaoxiao
2021-02-27
202
将IP列表存到allip文件里
将以下代码另存为check.sh,输入命令
bash check.sh
ping不通的IP会自动保存到logfile文件里
#! /bin/bash for i in `cat allip` do ping -c 1 $i|grep -q 'ttl=' && echo "$i ok" || echo "$i">>logfile done exit()
转载请注明原文地址: https://www.6miu.com/read-12820.html
技术
最新回复
(
0
)