• скрипт #!/bin/sh
    # A slightly complex but actually useful example
    inotifywait -mrq --timefmt '%d/%m/%y %H:%M' --format '%T %f' \
    -e close_write /home/billy | while read date time file; do
    rsync /home/billy/${file} rsync://billy@example.com/backup/${file} && \
    echo "At ${time} on ${date}, file ${file} was backed up via rsync"
    done

    Взято с inotify-tools.sourceforge.net

Replies (1)