当前位置: 首页 > article >正文

Linux命令——watch

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

用法:

vm@fedora:~$ watch --help

Usage:
 watch [options] command

Options:
  -b, --beep             beep if command has a non-zero exit
  -c, --color            interpret ANSI color and style sequences
  -d, --differences[=<permanent>]
                         highlight changes between updates
  -e, --errexit          exit if command has a non-zero exit
  -g, --chgexit          exit when output from command changes
  -q, --equexit <cycles>
                         exit when output from command does not change
  -n, --interval <secs>  seconds to wait between updates
  -p, --precise          attempt run command in precise intervals
  -r, --no-rerun         do not rerun program on window resize
  -t, --no-title         turn off header
  -w, --no-wrap          turn off line wrapping
  -x, --exec             pass command to exec instead of "sh -c"

 -h, --help     display this help and exit
 -v, --version  output version information and exit

For more details see watch(1).

用例:

每隔两秒执行一次uptime查看系统负载:

watch -n 2 uptime

http://www.kler.cn/a/152975.html

相关文章:

  • 模糊C均值(Fuzzy C-means,FCM)聚类的python程序代码的逐行解释,看完你也会写!!
  • sso/单点认证的理解
  • 虹科分享 | 平衡速度和优先级:为多样化的实时需求打造嵌入式网络(4)——从理论到实践:CANopen源代码配置
  • RocketMQ-快速实战
  • 【数电笔记】逻辑代数的基本定律、常用公式
  • 机器学习ROC曲线中的阈值thresholds
  • 传统算法: Pygame 实现快速排序
  • Promise的resolve和reject方法(手写题)
  • 零基础学Python的第六天||字符串(3)
  • 喜报 | 通付盾WAAP解决方案入选国家工业信息安全发展研究中心“2023年数字化转型自主创新解决方案优选案例”
  • 使用Java将yaml转为properties,保证顺序、实测无BUG版本
  • 11-30 SpringBoot2
  • c语言练习13周(1~5)
  • 【MATLAB源码-第91期】基于matlab的4QAM和4FSK在瑞利(rayleigh)信道下误码率对比仿真。
  • Kafka(一)在WSL单机搭建Kafka伪集群
  • 京东数据平台(数据运营)-2023年京东智能穿戴设备运营数据分析
  • QLabel实现点击事件
  • 实施全链路压测的步骤是怎样的?
  • 【LeetCode:2336. 无限集中的最小数字 | 数据结构设计】
  • XUbuntu22.04之安装OBS30.0强大录屏工具(一百九十五)