[Bash] watch command

watch

For example every 5 second, I want to print out the time then save the time into the a txt file

$watch -n5 'echo `date +%T` >> hello.txt'

# then you can see the output by using

$ tail -f hello.txt
posted @   Zhentiw  阅读(6)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 阿里最新开源QwQ-32B,效果媲美deepseek-r1满血版,部署成本又又又降低了!
· Manus重磅发布:全球首款通用AI代理技术深度解析与实战指南
· 开源Multi-agent AI智能体框架aevatar.ai,欢迎大家贡献代码
· 被坑几百块钱后,我竟然真的恢复了删除的微信聊天记录!
· AI技术革命,工作效率10个最佳AI工具
历史上的今天:
2021-06-07 [AWS - DA] ECS, ECR, Fargate
2020-06-07 [Intro to Deep Learning with PyTorch -- L2 -- N9] Perceptron Trick
2020-06-07 [Javascript] Broadcaster, operator, listener pattern: Write a debounce operator -- 1
2019-06-07 [Nx] Generate Angular, React FE applications and Nest Backend with shared interfaces, utils libraries by Nx
2017-06-07 [TypeStyle] Load raw CSS in TypeStyle
2017-06-07 [TypeStyle] Use TypeStyle keyframes to create CSS animations
2017-06-07 [Node] Using dotenv to config env variables
点击右上角即可分享
微信分享提示