ping 打印添加时间戳


ping 192.168.1.1 -c 10 | awk '{ print $0"\t" strftime("%Y-%m-%d %H:%M:%S",systime())}'

 

 

 

后台运行

nohup  ping 192.168.1.1 -c 10 | awk '{ print $0"\t" strftime("%Y-%m-%d %H:%M:%S",systime())}' > ping.txt

 

间隔200ms(-i 0.2), 打印时间戳(-D)

ping 192.168.1.1 -D -i 0.2 | awk '{ print $0"\t" strftime("%Y-%m-%d %H:%M:%S",systime())}'

 

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM