watch flags & options
-n, --interval
Set the refresh interval in seconds (default is 2).
watch -n 1 date
watch -n 5 df -h
-d, --differences
Highlight changes between successive updates.
watch -d free -m
watch -d -n 1 "ls -l /tmp"
-t, --no-title
Hide the header line showing the interval and command.
watch -t date
-g, --chgexit
Exit when the output of the command changes.
watch -g "ls /tmp"
watch -g -n 1 "cat status.txt"
-e, --errexit
Exit when the command returns a non-zero exit code.
watch -e "curl -sf http://localhost:8080/health"
-c, --color
Interpret ANSI color sequences in command output.
watch -c "ls --color=always"
watch -c -n 1 "docker ps --format 'table {{.Names}}\t{{.Status}}'"