Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages


home | help
WATCHTAB(5)		    BSD	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 subse-
     quent 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 ex-

     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 sin-
	      gle star-sign (*), or a punctuation-separated list of names
	      Their meaning is defined in kqueue(2) for	fflags for EVFILT_VN-

     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	com-

     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

     crontab(5)	filewatcherd(8)	kqueue(2)

BSD			       October 19, 2015				   BSD


Want to link to this manual page? Use this URL:

home | help