File watchers. I always forget about those and never use then, but I constantly feel like I need them. So I made this list to stop searching everywhere for those things which are surprisingly hard to find in a search engine.

  1. a quick review of file watchers
  2. Generic
    1. direvent
    2. entr
    3. fswatch
    4. gamin
    5. incron
    6. inoticoming
    7. inotify-hookable
    8. inotify-tools
    9. systemd .path units
    10. watchexec
    11. watchman
  3. Web development
    1. grip (markdown)
    2. livereload
    3. frameworks
  4. Unit tests
    1. autotest
    2. conttest
    3. tdaemon
    4. Test::Continuous
  5. File synchronization
    1. inosync
    2. lsyncd
  6. Intrusion detection
    1. fail2ban
    2. iwatch
    3. sshguard
  7. Other
    1. kfmon (kobo launcher)

Generic

Those tools an watch files or trees of files and execute whatever.

direvent

https://www.gnu.org.ua/software/direvent/

entr

http://eradman.com/entrproject/

fswatch

http://emcrisostomo.github.io/fswatch/

gamin

https://people.gnome.org/~veillard/gamin/

incron

https://github.com/ar-/incron

inoticoming

https://tracker.debian.org/pkg/inoticoming

inotify-hookable

https://metacpan.org/pod/App::Inotify::Hookable

inotify-tools

https://github.com/rvoicilas/inotify-tools/

systemd .path units

https://www.freedesktop.org/software/systemd/man/systemd.path.html

watchexec

https://github.com/watchexec/watchexec

watchman

http://facebook.github.io/watchman/

Web development

grip (markdown)

https://github.com/joeyespo/grip

livereload

https://github.com/lepture/python-livereload

frameworks

Many frameworks automatically reload files when they change. A few examples:

Unit tests

autotest

https://metacpan.org/pod/distribution/App-autotest/scripts/autotest

conttest

https://github.com/eigenhombre/continuous-testing-helper

tdaemon

https://github.com/brunobord/tdaemon

Test::Continuous

https://metacpan.org/pod/Test::Continuous

File synchronization

I will not go through a list of all the file synchronization tools here. Most of them have some sort of "wake-up" system to notify file changes, but they are considered out of scope here unless they can also launch custom commands. But just for the sake of the argument, I am aware of:

inosync

https://github.com/hollow/inosync

lsyncd

https://github.com/axkibe/lsyncd

Intrusion detection

Here again, there are many filesystem integrity checkers and intrusion detection systems (IDS), but they are not relevant here unless they can also execute arbitrary commands. But, again, here's an idea of the other stuff that is out there that might be a better fit than trying to fit a square peg in this round hole:

fail2ban

http://www.fail2ban.org/

iwatch

http://iwatch.sourceforge.net/

sshguard

https://sshguard.net/

Other

kfmon (kobo launcher)

https://github.com/NiLuJe/kfmon

I've probably missed half a million such programs so this might be expanded with time and your comments.

Update: I've added a bunch of tools. I was relunctant to add all those old inotify wrappers because I don't find them as interesting as the newer ones - they're really hard to use! - but I guess it's worth mentioning them even if just to criticise them. ;)

Notify

You also have inotifywait/inotifywatch, inotify-hookable, lsyncd (can do more than just sync)

bash apt-cache show inotify-tools inotify-hookable lsyncd

Comment by Sytoka
comment 2
fail2ban (likewise sshguard, etc) is a file monitor too, though with a specific intention in mind. Bon soir.
Comment by Nick
Created . Edited .