watch
Command Function
This command is used to periodically monitor the execution result of a command.
Syntax
watch
watch [-c/-n/-t/--count/--interval/-no-title/--over] [command]
Parameters
Table 1 Parameter description
Specifies the interval for periodically running the command, in seconds. |
|||
Usage
You can run the watch --over command to stop the currently running command monitoring.
Example
Example:
watch -n 2 -c 6 task
Output Description
Figure 1 task command monitoring result
NOTE: In this example, the task command has been executed every 2 seconds for six times, and the preceding figure shows the output of the last execution.