I'm sure I've seen a nicely crossplatform command-line tool for this, but I can't seem to find it. The closest (by support for non-poll APIs) seems to be 'simplefilewatcher'[1], but that's just a C++ library.<p>incron, inotify, filewatcher[2], puncher[3], guard[4] are a bunch of existing ones, but they're all either not entirely functional cross-platform, or require some faffing with dependencies to get working.<p>[1] <a href="https://code.google.com/p/simplefilewatcher/" rel="nofollow">https://code.google.com/p/simplefilewatcher/</a><p>[2] <a href="https://github.com/thomasfl/filewatcher" rel="nofollow">https://github.com/thomasfl/filewatcher</a><p>[3] <a href="http://rawsyntax.com/blog/puncher-the-simple-file-watcher-for-os-x/" rel="nofollow">http://rawsyntax.com/blog/puncher-the-simple-file-watcher-fo...</a><p>[4] <a href="https://github.com/guard/guard" rel="nofollow">https://github.com/guard/guard</a>