Another approach would be to use the Linux kernel's fantastic inotify() feature, which does not require running tools designed for other purposes...

https://linux.die.net/man/7/inotify

https://en.wikipedia.org/wiki/Inotify

There is also a less well utilized fsnotify feature for filesystem-wide notifications. Here is a cross-platform go implementation which also supports OSX: https://github.com/fsnotify/fsnotify

I myself quite enjoy using the very nice fswatch[0].

https://github.com/emcrisostomo/fswatch