Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

[inotify-tools](https://github.com/rvoicilas/inotify-tools/wiki) is the stuff you want. There's a nice utility called inotifywait in there which will block until there's a change in a file or directory (it does recursive as well).

You can get results from as simple as this bash one-liner:

     while(true); do inotifywait --exclude '.*.swp' -e close_write dir; make; done
I wrote that off the top of my head so it may not work straight off, but you get the idea.


Consider applying for YC's Winter 2027 batch! Applications are open till November 2.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: