watch Linux Commands
What is Linux watch Command?
Explanation
watch COMMAND:watch command executes the program/process at the specified time interval. If the time interval is not set, then it will execute the command every two seconds.
SYNTAX :
watch [options] command options
OPTIONS:
-n |
n seconds is the specified interval to run the program. |
-d |
Highlight the differences between successive updates. |
-h |
Display Help. |
-v,--version |
Display version. |
EXAMPLE:
-
watch -n 3 date
Above command updates the time zone for every three seconds.
Output:
Mon Dec 2 19:08:59 IST 2013
Mon Dec 2 19:08:56 IST 2013
Hence this command helps you to compare the results between the time intervals.