fsevents-tools

Monitor file system events and changes in real-time on macOS

brewmacoslinux
Try with needOr install directly
Source

About

Command-line utilities for the FSEvents API

Commands

fswatchfsevent_watch

Examples

Monitor a directory for any file system changes$ fswatch /path/to/directory
Watch a directory and execute a command when changes occur$ fswatch -o /path/to/directory | xargs -n1 echo 'Files changed:'
Monitor multiple paths with custom event filtering$ fswatch -x /path/to/dir1 /path/to/dir2