Watch Filesystem in Real Time on OS X and Ubuntu

Posted by Adrian Schneider on Super User See other posts from Super User or by Adrian Schneider
Published on 2012-06-01T21:58:39Z Indexed on 2012/06/01 22:43 UTC
Read the original article Hit count: 264

Filed under:
|
|
|

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.

© Super User or respective owner

Related posts about linux

Related posts about osx