iszjw 发表于 2018-5-19 06:50:06

linux watch 命令

  功能

  可以将命令的输出结果输出到标准输出设备(显示器),此命令一般多用于周期性执行相关命令
  

  选项

[*]  -d, --differences      高亮显示变化的区域
[*]  -n, --interval seconds   间隔时间
[*]  -t, --no-title      关闭watch命令在顶部的标题行
  

  示例
watch -n1 -d -t ifconfig eth0  

  建议
  一般不加-t 选项
  


  

  补充
  centos 7 默认是没有安装mlocate的,所以无法使用updatedb和locate这两个命令
yum install -y mlocate
页: [1]
查看完整版本: linux watch 命令