1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-08-23 09:24:10 +02:00
tldr/pages/common/watch.md
Managor 745d8aebd1
watch: merge common and linux, add examples (#15644)
Co-authored-by: Lena <126529524+acuteenvy@users.noreply.github.com>
2025-02-06 13:15:36 +01:00

28 lines
639 B
Markdown

# watch
> Execute a program periodically and monitor the output in full-screen mode.
> More information: <https://manned.org/watch>.
- Repeatedly run a command and show the result:
`watch {{command}}`
- Re-run a command every 60 seconds:
`watch --interval {{60}} {{command}}`
- Monitor disk space, highlighting differences as they appear:
`watch --differences {{df}}`
- Repeatedly run a pipeline and show the result:
`watch "{{command_1}} | {{command_2}} | {{command_3}}"`
- Exit `watch` if the visible output changes:
`watch --chgexit {{lsblk}}`
- Interpret terminal control characters:
`watch --color {{ls --color=always}}`