watch(1)

watch1

Periodically execute a command and display its output

Usage

watch [-celwx] [-s seconds] command [arg ...]

Overview

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.

-s seconds

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.

Releases

Unchanged in 4 releases since OpenBSD 7.8.

  1. 7.8–8.0

History

watch was first published in 1991 and has been available since OpenBSD 7.8.

Authors

Takuya Sato, Kazumasa Utashiro, YASUOKA Masahiko ⟨[email protected]⟩, and Job Snijders ⟨[email protected]⟩.

From man 8.0-current-20261101 in OpenBSD 8.0-current (2026-11-01). Parsed by carta from the page's mdoc source.