watchman(1) | watchman | watchman(1) |
watchman - a file watching service
watchman [--OPTION ...] COMMAND
watchman can recursively watch one or more directory trees (also referred to as roots). Watchman does not follow symlinks; it knows they exist, but they show up the same as any other file in its reporting and it will wait for a root to settle down before it will start to trigger notifications or command execution. Watchman is conservative, preferring to err on the side of caution; it considers files to be freshly changed when you start to watch them or when it is unsure. You can query a root for file changes since you last checked, or the current state of the tree. Watchman allows you to subscribe to file changes that occur in a root.
The following example establishes a watch on a source directory and then sets up a trigger named buildme that will run a tool named minify-css whenever a CSS file is changed. The tool will be passed a list of the changed filenames.
the single quotes around '*.css' are important:
The output for buildme will land in the Watchman log file unless you send it somewhere else. To use
OPTIONS
-h, --help
--inetd
-v, --version
-U, --sockname=PATH
-o, --logfile=PATH
--log-level
--pidfile=PATH
-p, --persistent
-n, --no-save-state
--statefile=PATH
-j, --json-command
--output-encoding=ARG
--server-encoding=ARG
-f, --foreground
--no-pretty
--no-spawn
--no-local
AVAILABLE COMMANDS
clock
debug-ageout
debug-contenthash
debug-drop-privs
debug-get-subscriptions
debug-poison
debug-recrawl
debug-set-subscriptions-paused
debug-show-cursors
find
flush-subscriptions
get-config
get-pid
get-sockname
list-capabilities
log
log-level
query
shutdown-server
since
state-enter
state-leave
subscribe
trigger
trigger-del
trigger-list
unsubscribe
version
watch
watch-del
watch-del-all
watch-list
watch-project
watchman-wait(1), watchman-make(1)
For more information, please refer the online documentation
8 Oct 2019 | Linux |