watch 可以帮你监测一个命令的运行结果,直接在 watch 后面接运行命令,watch 就会重复运行,并把每次的结果都更新在屏幕上,默认watch会以2s的间隔重复运行命令
-d --differences[=cumulative] 高亮显示变动
-n --interval= 周期(秒)
-t 或-no-title 会关闭watch命令在顶部的时间间隔
watch -d -n1 ifconfig