Linux common commands-66: watch

The watch command executes the given command periodically, and the command output is displayed in full screen, which can help you monitor the running result of a command, saving you from running it manually over and over again. Press ctrl+c to exit.

Syntax format: watch [parameter] [command]

Common parameters:

Example

 # 重复执行ls命令watch ls # 每隔2秒运行一次nvidia-smi watch -n 2 nvidia-smi

This article is reprinted from https://xugaoxiang.com/2022/06/22/linux-cmds-66-watch/
This site is for inclusion only, and the copyright belongs to the original author.

Leave a Comment