加入收藏
举报
02-14 20:03
#0
文件名称:
watch.md
所在目录:
Openharmony v1.0 / docs / docs-en / kernel
文件大小:
6.14 KB
下载地址:
fenwii/OpenHarmony
   
免责声明:本网站仅提供指向 GitHub 上的文件的链接,所有文件的版权归原作者所有,本网站不对文件内容的合法性、准确性或安全性承担任何责任。
文本预览:
# 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_\]
## Parameter Description
**Table 1** Parameters

































Parameter


Description


Default Value


Value Range


-c / --count


Indicates the number of times that the command is executed.


0xFFFFFF


(0, 0xFFFFFF]


-n / --interval


Indicates the interval for periodically running the command, in seconds.


1s


(0, 0xFFFFFF]


-t / -no-title


Disables time display on the top.


N/A


N/A


command


Indicates the command to be monitored.


N/A


N/A


--over


Stops the current command monitoring.


N/A


N/A



## Usage
You can run the **watch --over** command to stop the currently running command monitoring.
## Example
Enter **watch -n 2 -c 6 task**.
## Output
**Figure 1** **task** command monitoring result
![](figures/task-command-monitoring-result.png "task-command-monitoring-result")
>![](public_sys-resources/icon-note.gif) **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.
点赞 回复
回帖
支持markdown部分语法 ?