WATCH(1) | User Commands | WATCH(1) |
watch - Keep an eye on a command output.
watch [-n seconds] [-bt] command [args...]
The watch utility executes a command repeatedly every seconds seconds. This allows you to watch a program output change over the time.
It accepts the following options:
It can be very useful when backing up a disk and you need to see
how many files were already copied.
Let's suppose you're copying a disk from a terminal and, in another, you want
to keep an eye at du(1) output to see every minute if the file size
matches with what you're expecting.
This implementation supports intervals using both European or Anglo decimal separators, although sleeping in fractionated seconds does not make a lot of sense.
This implementation does not support the "WATCH_INTERVAL" environment variable.
execvp(3), nanosleep(2), curses(3X)
The watch(1) utility has a hazy history. Nobody seems to be
actually sure of where it appeared first.
According to procps 010114's watch C source code, where it first appeared in
that package, it was written from scratch by Tony Rems in 1991, and later
recieved many modifications and corrections by François Pinard.
However, according to Internet Initiative Japan Inc.'s iwatch manual page, the
watch utility came first from BSDi's BSD/OS 3.1 and their code is slightly
derived from it; he/she who wrote the manual page and comments at the
original source code also speculated that its existence was earlier than
BSD/OS 3.1, from some another free distribution, but there's no further
information that supports this.
This implementation mimics some of the basic behavior of procps-ng's watch, but only the necessary behavior to have a useful, simple and stable program.
06/14/23 | Heirloom Toolchest |