Skip to content

Instantly share code, notes, and snippets.

@JGrossholtz
Created November 19, 2018 13:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JGrossholtz/9c0dac4e0e502ae206344c65ce72471f to your computer and use it in GitHub Desktop.
Save JGrossholtz/9c0dac4e0e502ae206344c65ce72471f to your computer and use it in GitHub Desktop.
basic example of inotify-wait usage to recompile code when any file is changed
# Install the inotifywait package, on Fedora:
$ sudo dnf install inotify-tool
# Run inotify-wait on a loop
while true; do inotifywait -e modify -r <folder to watch>; < curstom ; commands> ; done
# eg: recompile a progam when a file is changed:
while true; do inotifywait -e modify -r sources/; make clean; make;done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment