4 ms·
The required kernel hooks exist in pretty much any common OS these days, it is a user-space tool that is sometimes missing. It may not be installed by default,
by dspillett 4y ago
The required kernel hooks exist in pretty much any common OS these days, it is a user-space tool that is sometimes missing.
It may not be installed by default, but inotifywait is available in common Linux distributions, usually in a package called something like ionotify-tools, and has been for over a decade-ana-half IIRC. It'll work under WSL on Windows too, though only for ext4 devices not bits of the Windows filesystem made available to Linux.
I can't speak to what other OSs include by default, but as every major OS has a different API for how to register a listener & how it gets messages no built-in tool is going to be cross-platform. There are third party tools which present more cross-platform consistency, most notably https://github.com/emcrisostomo/fswatch#readme https://github.com/emcrisostomo/fswatch#readme (also available in common Linux distros, just an apt install away in Debian for instance).