2016-01-22 00:13:27 +00:00
|
|
|
# watch
|
|
|
|
|
|
|
|
> Execute a program periodically, showing output fullscreen.
|
2021-10-05 04:35:50 +01:00
|
|
|
> More information: <https://manned.org/watch>.
|
2016-01-22 00:13:27 +00:00
|
|
|
|
|
|
|
- Repeatedly run a command and show the result:
|
|
|
|
|
|
|
|
`watch {{command}}`
|
|
|
|
|
|
|
|
- Re-run a command every 60 seconds:
|
|
|
|
|
|
|
|
`watch -n {{60}} {{command}}`
|
|
|
|
|
2016-01-22 01:37:36 +00:00
|
|
|
- Monitor the contents of a directory, highlighting differences as they appear:
|
2016-01-22 00:13:27 +00:00
|
|
|
|
|
|
|
`watch -d {{ls -l}}`
|
2022-06-21 13:04:26 +01:00
|
|
|
|
|
|
|
- Repeatedly run a pipeline and show the result:
|
|
|
|
|
|
|
|
`watch '{{command_1}} | {{command_2}} | {{command_3}}'`
|