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 "user-defined" seconds. This allows you to watch a program output change over the time.
It accepts the following options:
It can be very useful when backuping some disc and needing to see
how many files were already copied.
Lets suppose you're copying a disc 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 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 has 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 Francois Pinard.
However, according to Internet Initiative Japan Inc.'s iwatch manual page, the
watch utility came first from BSDI Inc. 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 mimicks some of the basic behavior of procps-ng's watch, just the necessary to have a useful, simple and stable program.
06/14/23 | Heirloom Toolchest |