bash 命令刷新其他命令的输出
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/6315677/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-18 00:10:00 来源:igfitidea点击:
Command to refresh output of other command
提问by Rfraile
If i have a command that each time give me a output, (a status, for example). How i can do it to refresh this output each 2 second, for example?. I remember that there are one command wich do it. Example:
如果我有一个命令,每次都会给我一个输出,(例如一个状态)。例如,我如何做到每 2 秒刷新一次此输出?我记得有一个命令可以做到这一点。例子:
cat /proc/mdstat
[======>..............] resync = 30.8% (150544832/488383936) finish=65.8min speed=85472K/sec
othercommand cat /proc/mdstat
Thanks
谢谢
回答by Dark Falcon
You're looking for the watchcommand.
您正在寻找watch命令。

