ubuntu骚操作watch

作者: 苏牧传媒 | 来源:发表于2018-08-17 17:11 被阅读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 * '

    相关文章

      网友评论

      本文标题:ubuntu骚操作watch

      本文链接:https://www.haomeiwen.com/subject/wsstiftx.html