WHEN(1) General
Commands Manual WHEN(1)
NAME
when
—
a simple file watcher
SYNPOSIS
when
[-i
]
file ...
DESCRIPTION
when
is a simple program that watches any
given file for changes. When the file changes, its
name (as specified in the arguments to when
) is
printed on standard output.
If the -i
argument is provided, an initial
such line is printed when the program starts, before beginning to watch for
changes.
ERRORS
If one of the watched files is deleted, a message is printed on standard error and the program exits with error code 1.
If a file is renamed, a notice is printed on standard error, but the program keeps running.
EXAMPLES
when * | xargs -I% cp % /mnt/usb/
when -i *.ms | while read f; do make "${f%.ms}".pdf && kill -HUP mupdf done
AUTHORS
when
is written by John
Ankarström <john (at) ankarstrom.se>.
July 22,
2021 OpenBSD 7.2