1incrontab(5) incron documentation incrontab(5)
2
3
4
6 incrontab - tables for driving inotify cron (incron)
7
9 An incrontab file contains instructions to the incrond(8) daemon of the
10 general form: "run this command on these file events". There are two
11 categories of tables: system tables (with root privileges) and user
12 tables (with user privileges).
13
14 System tables are (by default) located in /etc/incron.d and may have
15 any names. Each system table exists separately inside incron and their
16 watches never collide.
17
18 Each user has their own table, and commands in any given incrontab will
19 be executed as the user who owns the incrontab. System users (such as
20 apache, postfix, nobody etc.) may have their own incrontab.
21
22 incrontab files are read when the incrond(8) daemon starts and after
23 any change (incrontab file are being hooked when incrond is running).
24
25 Blank lines are ignored. The general line format is the following:
26
27 <path> <mask> <command>
28
29 Where path is an absolute filesystem path, mask is an event mask (in
30 symbolic or numeric form) and command is an executable file (or a
31 script) with its arguments. The executable file may be noted as an
32 absolute path or only as the name itself (PATH locations are examined).
33
34 Please remember that the same path may occur only once per table (oth‐
35 erwise only the first occurrence takes effect and an error message is
36 emitted to the system log).
37
39 These are some example rules which can be used in an incrontab file:
40
41 /tmp IN_ALL_EVENTS abcd $@/$# $%
42
43 /usr/bin IN_ACCESS,IN_NO_LOOP abcd $#
44
45 /home IN_CREATE /usr/local/bin/abcd $#
46
47 /var/log 12 abcd $@/$#
48
49 The first line monitors all events on the /tmp directory. When an event
50 occurs it runs a application called 'abcd' with the full path of the
51 file as the first arguments and the event flags as the second one.
52
53 The second line monitors accesses (readings) on the /usr/bin directory.
54 The application 'abcd' is run as a handler and the appropriate event
55 watch is disabled until the program finishes. The file name (without
56 the directory path) is passed in as an argument.
57
58 The third example is used for monitoring the /home directory for newly
59 create files or directories (it practically means an event is sent when
60 a new user is added). This event is processed by a program specified by
61 an absolute path.
62
63 And the final line shows how to use numeric event mask instead of tex‐
64 tual one. The value 12 is exactly the same as IN_ATTRIB,IN_CLOSE_WRITE.
65
66
68 incrond(8), incrontab(1), incron.conf(5)
69
71 Lukas Jelinek <lukas@aiken.cz>
72
74 This program is free software. It can be used, redistributed and/or
75 modified under the terms of the GNU General Public License, version 2.
76
77
78
79Lukas Jelinek 0.5.5 incrontab(5)