while true; do ping -c 1 www.baidu.com | awk '{print "["strftime("%F %H:%M:%S")"]:"$0}' |grep from >> ping.log;sleep 1; done &

在ping百度的时候发现ping的次数多了之后百度会拒绝,所以改为ping天气网站

 

while true; do ping -c 1 www.weather.com.cn | awk '{print "["strftime("%F %H:%M:%S")"]:"$0}' |grep from >> ping.log;sleep 1; done &

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-26
  • 2021-05-15
  • 2022-12-23
猜你喜欢
  • 2021-08-05
  • 2021-05-18
  • 2022-12-23
  • 2021-05-20
  • 2022-12-23
  • 2022-12-23
  • 2021-07-31
相关资源
相似解决方案