watch
command,
Syntax
watch [options] command
Parameters
| Parameters | Description | Examples | Level |
|---|---|---|---|
-n |
New(, 2 ) | |
Common |
-d |
|
Common | |
-t |
( and command) | |
Common |
-g |
|
Common |
Examples
New Pod
watch -n 1 'kubectl get pods'
,
watch -d 'free -h'
5
watch -n 5 'docker ps --format "table {{.Names}}\t{{.Status}}"'watch -n 2 'ss -s'
and more output
watch -g 'ls output/'
Tips
- command
- -d
- Ctrl+C watch
- : while true; do clear; command; sleep 2; done