Get the latest tech news
A quick review of file watchers
You also have inotifywait/inotifywatch, inotify-hookable, lsyncd (can do more than just sync) apt-cache show inotify-tools inotify-hookable lsyncd File watchers. I always forget about those and never use then, but I constantly feel like I need them.
2016-2019 Rust Apache-2.0 No Debian package ( bug 946546) supports.gitignore files and filename patterns merges multiple events fast polling can clear screen between calls waits for command to complete to launch again simple commandline, ie. 2013-2019 C++, Python Apache-2 Facebook Debian package, since 2019 (bullseye) can watch multiple directories waits for settling somewhat complex client/server architecture, sends output to logfiles, although watchman-make provides a nice little wrapper: 2006-2009 Perl GPL-2+ Debian package since 2006 emails on file changes can also execute commands, but primarily designed as an intrusion detection system XML configuration (???)
Or read this on Hacker News