Watch file change in linux with inotify

16. marts, 2022
Bash
watch.sh
#!/bin/bash
inotifywait -m -e modify --format '%f' /var/stream | while read FILE
do
    php /var/www/app/consume.php $FILE
done