echo "start monitoring file ..."
while true
do
    FILE_MODIFIED=`/usr/sbin/inotifywait -e close_write -e create --format '%w' /tmp/file`     # do something
    echo "file modified, do something..."
done

How to use inotify-tools to trigger scripts on filesystem events

arrow
arrow
    全站熱搜

    JohnDX 發表在 痞客邦 留言(0) 人氣()