24.4.7. Monitoring Files and Directories with gamin
inotify. Changes on other file systems are monitored by the inotify monitor that is implemented in GLib directly.
/media/*on Linux. Users can override or extend these settings by modifying the content of one of the following configuration files:
Commands accepted by the configuration file
- To express that kernel monitoring should be used for matching paths.
- To express that polling should be used for matching paths.
- To control what notification method is used on a filesystem type.
# configuration for gamin # Can be used to override the default behaviour. # notify filepath(s) : indicate to use kernel notification # poll filepath(s) : indicate to use polling instead # fsset fsname method poll_limit : indicate what method of notification for the file system # kernel - use the kernel for notification # poll - use polling for notification # none - don't use any notification # the poll_limit is the number of seconds # that must pass before a resource is polled again. # It is optional, and if it is not present the previous # value will be used or the default.
notify /mnt/local* /mnt/pictures*# use kernel notification on these paths
poll /temp/*# use poll notification on these paths
fsset nfs poll 10# use polling on nfs mounts and poll once every 10 seconds
/etc/gamin/mandatory_gaminrcconfiguration file allows the system administrator to override any potentially dangerous preferences set by the user. When checking a path to guess whether polling or kernel notification should be used, gamin checks first the user-provided rules in their declaration order within the configuration file and then check the predefined rules. This way the first declaration for
/mnt/local*in the example override the default one for