1 Star 0 Fork 5K

aaron / docs

forked from OpenHarmony / docs 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
watch.md 6.37 KB
一键复制 编辑 原始数据 按行查看 历史
NEEN 提交于 2021-03-12 17:59 . !197 Docs Update version 1.0.1

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

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.

1
https://gitee.com/mibo_com/docs.git
git@gitee.com:mibo_com/docs.git
mibo_com
docs
docs
master

搜索帮助