DOKK / manpages / debian 12 / python3-pywatchman / watchman-wait.1.en
watchman-wait(1) watchman-wait watchman-wait(1)

watchman-wait - waits for changes to files.

watchman [-h] [--relative RELATIVE] [--fields FIELDS]
[-s SEPARATOR] [-m MAX_EVENTS] [-p PATTERN [PATTERN ...]]
[-t TIMEOUT]
path [path ...]

watchman-wait uses the watchman service to efficiently and recursively watch your specified list of paths.

It is suitable for waiting for changes to files from shell scripts.

It can stop after a configurable number of events are observed. The default is a single event. You may also remove the limit and allow it to execute continuously.

watchman-wait will print one event per line. The event information includes your specified list of fields, with each field separated by a space (or your choice of --separator).

Events are consolidated and settled by the watchman server before they are dispatched to watchman-wait.

OPTIONAL ARGUMENTS

-h, --help

show this help message and exit

--relative RELATIVE

print paths relative to this dir (default=PWD)

--fields FIELDS

Comma separated list of file information fields to return. The default is just the name. For a list of possible fields, see: https://facebook.github.io/watch man/docs/cmd/query.html#available-fields

-s SEPARATOR, --separator SEPARATOR

String to use as field separator for event output.

-m MAX_EVENTS, --max-events MAX_EVENTS

Set the maximum number of events that will be processed. When the limit is reached, watchman-wait will exit. The default is 1. Setting the limit to 0 removes the limit, causing watchman-wait to execute indefinitely.

-p PATTERN [PATTERN ...], --pattern PATTERN [PATTERN ...]

Only emit paths that match this list of patterns. Patterns are applied by the watchman server and are matched against the root-relative paths. You will almost certainly want to use quotes around your pattern list so that your shell doesn't interpret the pattern. The pattern syntax is wildmatch style; globbing with recursive matching via '**'.

-t TIMEOUT, --timeout TIMEOUT

Exit if no events trigger within the specified timeout. If timeout is zero (the default) then keep running indefinitely.

POSITIONAL ARGUMENTS

path

path(s) to watch

EXIT STATUS

0

After successfully waiting for event(s)

1

In case of a runtime error of some kind

2

The -t/--timeout option was used and that amount of time passed before an event was received

3

Execution was interrupted (Ctrl-C)

watchman(1), watchman-make(1)

For more information, please refer the online documentation

8 Oct 2019 Linux