If I have a command that each time gives me a output, (a status, for example). How I can do it to refresh this output every 2 seconds, for example? I remember that there is one command which can do it.
Example:
cat /proc/mdstat 
[======>..............]  resync = 30.8% (150544832/488383936) finish=65.8开发者_运维问答min speed=85472K/sec
othercommand cat /proc/mdstat
You're looking for the watch command.
Example from FrankyFred:
watch -n 5 free -m
will refresh the free -m command every 5s
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论