Last active
March 18, 2021 12:12
-
-
Save kopiro/9051106ab5d9826b82a140bc69ee4d16 to your computer and use it in GitHub Desktop.
Monitor directory change and execute a command
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
#!/bin/sh | |
while (true); do | |
inotifywait . -m -r -e create -e modify -e move -e delete | |
./execute-command.sh | |
done |
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
#!/bin/bash | |
# brew install watch md5 | |
while (true); do | |
watch --chgexit "find . -type f -exec md5 {} \;" | |
./execute-command.sh | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment