Loading

常用命令-watch

每隔一秒高亮显示网络链接数的变化情况

# -n 设置间隔,-d,difference,高亮显示不同
watch -n 1 -d netstat -ant
# -d 高亮显示
watch -d 'ls /home/omd'
# -t会关闭watch命令在顶部的时间间隔
watch -t 'ls /home/omd'

每隔一秒高亮显示http链接数的变化情况

watch -n 1 -d 'pstree|grep http'

实时查看模拟攻击客户机建立起来的连接数

watch -n 1 -d 'netstat -an | grep "21" | egrep "192.168.25.100"| wc -l'

监测当前目录中 scf 的文件的变化

watch -d 'ls -l|grep scf'

10秒一次输出系统的平均负载

watch -n 1 -d "uptime"

 

posted @ 2021-04-16 18:17  Outsrkem  阅读(62)  评论(0编辑  收藏  举报