mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-03-12 18:59:06 +00:00
Update cheatsheets
This commit is contained in:
18
tldr/watch
18
tldr/watch
@@ -5,7 +5,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# watch
|
||||
|
||||
> Execute a program periodically, showing output fullscreen.
|
||||
> 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:
|
||||
@@ -14,12 +14,20 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Re-run a command every 60 seconds:
|
||||
|
||||
`watch -n {{60}} {{command}}`
|
||||
`watch --interval {{60}} {{command}}`
|
||||
|
||||
- Monitor the contents of a directory, highlighting differences as they appear:
|
||||
- Monitor disk space, highlighting differences as they appear:
|
||||
|
||||
`watch -d {{ls -l}}`
|
||||
`watch --differences {{df}}`
|
||||
|
||||
- Repeatedly run a pipeline and show the result:
|
||||
|
||||
`watch '{{command_1}} | {{command_2}} | {{command_3}}'`
|
||||
`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}}`
|
||||
|
||||
Reference in New Issue
Block a user