GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
WATCHTAB(5) FreeBSD File Formats Manual WATCHTAB(5)

watchtab
tables for driving filewatcherd

A watchtab file contains instructions to the filewatcherd(8) daemon of the general form: ``run this command when these events happen to the file at this path''.

Blank lines and leading spaces and tabs are ignored. Lines whose first non-space character is a pound-sign (#) are comments, and are ignored. Note that comments are not allowed on the same line as watchtab commands, since they will be taken to be part of the command. Similarly, comments are not allowed on the same line as environment variable settings.

An active line of a watchtab will be either an environment setting or a command. An environment setting is of the form

    name = value

where the spaces around the equal-sign (=) are optional, and any subsequent non-leading spaces in value will be part of the value assigned to name. Note that name cannot contain any blackslash or tabulation.

Several environment variables are set up automatically by the filewatcherd(8) daemon. LOGNAME and USER are set to the command user, HOME is set to the home directory of the command user, unless explicitly overriden. TRIGGER is set to the path that has triggered the command execution.

The format of a watchtab command is a tabulation-separated sequence of fields, interpreted as follow:

path
Path of the file to watch
events
Set of events which trigger the command. It can either be a single star-sign (*), or a punctuation-separated list of names among: DELETE, WRITE, EXTEND, ATTRIB, LINK, RENAME and REVOKE. Their meaning is defined in kqueue(2) for fflags for EVFILT_VNODE.
delay
Number of seconds, allowing a decimal point, between the trigger and when the command is actually run.
user
User, and optionally group preceded by a colon sign (:), to change to before running the command.
chroot
Path of a directory in which to chroot before running the command.
command
The command to run.
When less than 6 fields are given in a command line, the chroot value is considered omitted, and chroot will be performed. When less than 5 fields are given, the user value is considered omitted, and no setuid or setgid will be performed. When less than 4 fields are given, the delay value is considered as zero. It is an error to provide less than 3 fields.

crontab(5) filewatcherd(8) kqueue(2)
October 19, 2015 FreeBSD 13.1-RELEASE

Search for    or go to Top of page |  Section 5 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.