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

Linux命令——watch

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

用法:

vm@fedora:~$ watch --helpUsage:watch [options] commandOptions:-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 exitFor more details see watch(1).

用例:

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

watch -n 2 uptime
http://www.lryc.cn/news/251146.html

相关文章:

  • 力扣题:字符的统计-12.2
  • Python----Pandas
  • 【UE】UEC++获取屏幕颜色GetPixelFromCursorPosition()
  • 数学建模-基于BL回归模型和决策树模型对早产危险因素的探究和预测
  • 接口测试 —— 接口测试的意义
  • 一些常见的爬虫库
  • 2023.12.2 做一个后台管理网页(左侧边栏实现手风琴和隐藏/出现效果)
  • 【EMFace】《EMface: Detecting Hard Faces by Exploring Receptive Field Pyramids》
  • 详细学习Pyqt5的20种输入控件(Input Widgets)
  • 【JavaEE初阶】Thread 类及常见方法、线程的状态
  • 0 NLP: 数据获取与EDA
  • 159.库存管理(TOPk问题!)
  • 【开源】基于Vue+SpringBoot的康复中心管理系统
  • 设计模式总览
  • 数据链路层之VLAN基本概念和基本原理
  • UVA11729 Commando War
  • 【数据库】数据库基于封锁机制的调度器,使冲突可串行化,保障事务和调度一致性
  • 大文件分片上传、分片进度以及整体进度、断点续传(一)
  • Pytest 的小例子
  • 大数据(十一):概率统计基础
  • web前端之TypeScript
  • 计网Lesson6 - IP 地址分类管理
  • Nat. Mach. Intell. | 预测人工智能的未来:在指数级增长的知识网络中使用基于机器学习的链接预测
  • MySQL海量数据配置优化教程
  • Mac-idea快捷键操作
  • HarmonyOS脚手架:UI组件之文本和图片
  • 详细学习Pyqt5中的6种按钮
  • 【工具】Zotero|使用Zotero向Word中插入引用文献(2023年)
  • 利用Python爬虫爬取豆瓣电影排名信息
  • 灯光开不了了,是不是NVIDIA的问题