I'm using incron to watch for events in a directory but I want to exclude some subdirectory or some filename PATTERNS.
Is there a way I can do this elegantly?
You can't do exclusions through incrontab. You can list the files explicitly, or you can make a wrapper to filter files which you do not want to process.
A super-simple wrapper:
if ! grep -q $1 /path/to/incron.excludes
exec /path/to/realscript.sh $1
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
4 years ago