一起生信啦啦啦ubuntu_skill

ubuntu骚操作watch

2018-08-17  本文已影响1人  苏牧传媒

ref: linux命令之watch -- 周期性地执行命令 - CSDN博客

watch是周期性的执行下个程序,并全屏显示执行结果:

watch -n 5 -t -d=cumulative 'command'

-n 每隔5秒周期执行一次

-t 开头的间隔时间和信息等不显示

-d=cumulative 发生变动的地方高亮

例如:

watch -n 5 -t -d=cumulative 'tail -n 5 xxx.log'

或者:

watch -n 5 -t -d=cumulative 'date && du -h -a -d 0 * '

上一篇 下一篇

猜你喜欢

热点阅读