It seems that inotifywait works with exclude lists only.
I have seen the workarounds, but don't like them:
How to use inotifywait to watch a directory for creation of files of a specific extension
Is there a tool which allows listening for *.json files only (without workarounds)?
I want to call a tool (without wrapping it in a script). The work-around of above question needs a loop. I would like to avoid this, if possible.
Update: Since there seems to be no tool which can do this out-of-the-box I wrote a simple Python script and used the lib pyinotify
inotify
with custom treatment to only considers the files you have interest in. Also file extension are not consider to identify files in Linux. They only exists to help readability for human. – Kiwy Sep 12 '18 at 14:23--include
and--includei
option, but it's not in the binary I have. Confused now?! – ams Sep 21 '18 at 22:36