linux watch 命令使用;进行循环执行程序,并显示结果;
2024-09-01 23:18:22
watch 能间歇地执行程序,并将输出结果以全屏的方式显示,默认时2s执行一次;
watch -n 5 ping -c 1 www.baidu.com # 进行循环5秒钟,发送一次ping包;
使用范例:
To watch for mail, you might do watch -n from To watch the contents of a directory change, you could use watch -d ls -l If you're only interested in files owned by user joe, you might use watch -d 'ls -l | fgrep joe' To see the effects of quoting, try these out watch echo $$
watch echo '$$'
watch echo "'"'$$'"'"
更多文档,请直接查找man手册;非常好用的工具,我今天才知道。。
保持更新,更多内容请关注 cnblogs.com/xuyaowen;
最新文章
- 【OOAD】面向对象设计原则概述
- js- 千分位分割
- plsql快速选中一行的快捷键
- PE安装原版XP系统(含高版本PE安装选项灰色处理办法)
- js json与字符串转换
- sharepoint 2010 页面添加footer方法 custom footer for sharepoint 2010 master page
- HDU-1814 Peaceful Commission 2sat
- 最新Blog
- phpwind 去除init.phpwind.net统计功能
- Java 实现享元(Flyweight)模式
- dfs-hdu-4620-Fruit Ninja Extreme
- 通用mapper的使用
- 迈向angularjs2系列(1):typescript指南
- [bzoj4850][Jsoi2016]灯塔
- bzoj2434 fail树 + dfs序 + 树状数组
- element-ui组件中时间选择器设置时间禁用
- excel 表格粘贴到word 显示不完整
- mysql 5.7中的threads
- 51nod 1378 夹克老爷的愤怒(树型dp+贪心)
- 第二阶段冲刺——four
热门文章
- webpack-dev-server工具
- Hive脚本中切勿使用/**/注释
- Java之数据库表字段有关键字报错java.sql.SQLSyntaxErrorException
- 一分钟理解Java公平锁与非公平锁
- SVN异常,Previous operation has not finished; run 'cleanup' if it was interrupted
- 如何用web3部署智能合约
- html中的框架frameset和frame及iframe
- SecureCRT 破解安装详细教程
- Django中的sql注入
- docker面试题和解答(一)