Watchman: Execute a command when something changes
1–10 of 98 posts
Re: Watchman: Execute a command when something changes
#2It's mind-boggling that most systems don't have a standard tool for observing file changes. The only language I know of that has a platform-agnostic API for this is Factor.
Re: Watchman: Execute a command when something changes
#3Advantages of Facebook’s watchman:
1. Implements efficient file system event watches on macOS and Windows
2. IPC/daemon system reduces resource use because overlapping watches/triggers don’t use more inotify slots.
3. Denounces / waits for changes to settle
4. Client libraries in a few different languages for scripting purposes
Re: Watchman: Execute a command when something changes
#4Re: Watchman: Execute a command when something changes
#5Re: Watchman: Execute a command when something changes
#6For example:
dnf install inotify-tools
or
apt-get install inotify-toolsRe: Watchman: Execute a command when something changes
#7What does this add to inotifywait? That does exactly the same as this project, which uses inotifywait to reimplement inotifywait. For example: dnf install inotify-tools or apt-get install inotify-tools
[edit: fswatch looks very promising, and may be a better choice than either ifnotifywait or watchman]
Re: Watchman: Execute a command when something changes
#8What does this add to inotifywait? That does exactly the same as this project, which uses inotifywait to reimplement inotifywait. For example: dnf install inotify-tools or apt-get install inotify-tools
ifnotifywait doesn't exist on macOS, so in addition to that not being an option on macos, this would be something you could write tools that a team who used multiple platforms, or a person with setups on multiple os's, could use. I suspect this might even be usable on windows. [edit: fswatch looks very promising, and may be a better choice than either ifnotifywait or watchman]
Adding a new layer atop inotify tools doesn't make that package automatically run on new platforms. There are already tools on macos that use the native FSEvents API for watching for file changes and executing scripts.
Re: Watchman: Execute a command when something changes
#9What does this add to inotifywait? That does exactly the same as this project, which uses inotifywait to reimplement inotifywait. For example: dnf install inotify-tools or apt-get install inotify-tools
Re: Watchman: Execute a command when something changes
#10What does this add to inotifywait? That does exactly the same as this project, which uses inotifywait to reimplement inotifywait. For example: dnf install inotify-tools or apt-get install inotify-tools
ifnotifywait doesn't exist on macOS, so in addition to that not being an option on macos, this would be something you could write tools that a team who used multiple platforms, or a person with setups on multiple os's, could use. I suspect this might even be usable on windows. [edit: fswatch looks very promising, and may be a better choice than either ifnotifywait or watchman]
The unique features in this over straight inotifywait is plugging together the command you want to execute, and some event dedupe logic. Grand majority of the code is around colorized logs, command docs, and some options handling code which mostly just gets piped to inotifywait.