watchfs(1) - SerenityOS man pages

#Name

watchfs - watch a file or directory being changed

#Synopsis

$ watchfs [options...] [path...]

#Description

watchfs watches files and directories being changed.

#Options

#Arguments

#Examples

# watch /tmp with all events being handled (child creation and deletion)
$ watchfs -a /tmp/
# watch /tmp with child creation events being handled
$ watchfs -c /tmp/
# watch /tmp with child creation events being handled
$ watchfs -D /tmp/

# watch /tmp with all events being handled (child creation and deletion) and exit after first change
$ watchfs -E /tmp/

# watch /tmp/test_file with all events being handled (file being deleted, metadata being modified or content modified)
$ watchfs -a /tmp/test_file
# watch /tmp/test_file being deleted
$ watchfs -d /tmp/test_file
# watch /tmp/test_file being metadata-modified
$ watchfs -M /tmp/test_file
# watch /tmp/test_file being content-modified
$ watchfs -m /tmp/test_file

#See also