computer_knowledge_notes/Software/文本转换/watch.md

433 B
Raw Blame History

watch [options] <command>	# 周期性执行command全屏输出默认周期为2秒

选项

-d, --differences permanent
-n, --interval seconds	# 执行周期设为seconds秒
-x, --exec		# 命令默认是通过"sh -c"来执行的,这意味着要给命令加引号才能正确执行。而使用此选项,命令将通过"exec"来执行。

退出状态

0		# 成功执行
1
2
3
4
5
7
8
other