linux watch命令详解
watch命令可以间断性地运行某个应用程序,并显示输出。
语法
watch [-dhvt] [-n <seconds>] [--differences[=cumulative]] [--help] [--interval=<seconds>] [--no-title] [--version] <com-mand>
参数选项
-n或—interval
watch缺省每2秒运行一下程序,可以用-n或–interval来指定间隔的时间。
-d或–differences
用-d或–differences 选项watch 会高亮显示变化的区域。而—cumulative 选项会把变动过的地方(不管最近的那次有没有变动)都高亮显示出来。
-t 或–no-title
-t 或–no-title 选项会关闭watch命令在顶部的时间间隔、命令、当前时间的输出。
样例
watch –differences=cumulative uptime
watch -t –differences=cumulative uptime
相关资料
分类: LINUX
