Linux Commands for Beginners--The Watch Command

来源:互联网 发布:linux 显示目录结构 编辑:程序博客网 时间:2024/06/01 09:36
In this part, I talk about the watch command.


1.COMMAND :

      watch
  DESCRIPTION :
      execute a program periodically, showing output fullscreen
  SYNOPSIS :
       watch [option] <command>
   OPTION :
       -n :  By default, the program is run every 2 seconds; use -n  to specify a different interval.
   command: any linux command you want to type
Example :
[piniheaven@localhost ~]$ watch -n 10 free -m  #Every 10.0s free -mwill be executed automatically
Every 10.0s: free -m                                    Tue Sep  3 17:48:56 2013


             total       used       free     shared    buffers     cached
Mem:          5690       1388       4301          0         82        620
-/+ buffers/cache:        685       5004
Swap:            0          0          0
原创粉丝点击