Watch Filesystem in Real Time on OS X and Ubuntu
- by Adrian Schneider
I'm looking for a CLI tool which will watch a directory and spit out the names of files that change in real time.
some_watch_command /path/to/some/folder | xargs some_callback
I'm aware of inotify (inotify-tools?) and it seems to be what I need, but I need something that is both Linux (in my case Ubuntu) and OSX compatible.
It doesn't need to be lightning fast, but it does need to trigger upon changes (within a second is reasonable). Also, I don't necessarily need the exact CLI program mentioned above. If some underlying tech exists and is easily scriptable on both platforms that would be great too.