Created
November 19, 2018 13:44
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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