WATCH(1) General
Commands Manual WATCH(1)
NAME
watch —
periodically execute a command and
display its output
SYNOPSIS
watch |
[-celwx] [-s
seconds] command
[arg ...] |
DESCRIPTION
The watch utility periodically executes
and displays the output of command. Differences
between successive runs can be highlighted.
The options are as follows:
-c- Highlight changed characters.
-e- Pause updating if command exits with a non-zero exit code.
-l- Highlight changed lines.
-sseconds- Set the interval between updates to seconds. The default is 1 second.
-w- Highlight changed words.
-x- Pass command to execl(3) instead of
sh -c, for different quoting and shell escaping behaviour.
INTERACTIVE COMMANDS
Certain characters cause immediate action by
watch. These are:
- ⟨
Space⟩ - Run command again.
- ⟨
Page Down⟩ - Scroll down a screenful.
- ⟨
Page Up⟩ - Scroll up a screenful.
[| ⟨left arrow⟩- Scroll left by one column.
]| ⟨right arrow⟩- Scroll right by one column.
c- Highlight changed characters.
e- Pause command executions if the command exits with a non-zero exit code.
g- Scroll to top.
H- Scroll left half a screen.
h|?- Display a summary of the commands (help screen).
J- Scroll down half a screen.
j| ⟨down arrow⟩- Scroll down one line.
K- Scroll up half a screen.
k| ⟨up arrow⟩- Scroll up one line.
L- Scroll right half a screen.
l- Highlight changed lines.
r- Display information about resource utilization.
s- Change the update interval.
p- Pause or resume command executions.
⟨
Space⟩ can be used while paused. w- Highlight changed words.
q- Quit
watch.
SEE ALSO
HISTORY
watch was first published in 1991 and has
been available since OpenBSD 7.8.
AUTHORS
Takuya Sato, Kazumasa Utashiro, YASUOKA Masahiko <yasuoka@openbsd.org>, and Job Snijders <job@openbsd.org>.
OpenBSD 7.8 June
27, 2025 WATCH(1)