sudo iwatch -r -e create /mail/vmail/sarrc.ru/v.bagaev
/home/sarmailadmin/handlers_for_mail/handler_new.php
iwatch -r -e access,modify -c “ls -lht %f | awk ‘{print $3}’|xargs echo ‘%f was changed by user'” >> /tmp/watched_files.txt -X /home/user1/error/ /home/user1 –d
echo -n 'magic' | tee -a file555.txt
iwatch -e move -c "echo %f " >> /tmp/watched_files.txt /root/test –d
sudo iwatch -t ':2,' -r -c "echo $(date) %e %f |grep IN_MOVED_TO >> /home/myadmin/iwatch.log" -e move /var/vmail/servicem.ru/admin
"echo %e %f|grep IN_MOVED_TO >> /home/myadmin/iwatch.log"
iwatch -e move -c "echo $(date) %f >> /tmp/iwatch.log" ./test
<path type="single" events="moved_to" alert="off" exec="echo $(date +%s) %f | tee -a /tmp/iwatch.log">/mail/vmail/sarrc.ru/testmail</path>
echo " /var/vmail/servicem.ru/admin/Maildir/cur/1527241343.M8571P7205.mailbuntu.ServiceM.local,S=1791,W=1830:2,S is moved to /var/vmail/servicem.ru/admin/Maildir/cur/1527241343.M8571P7205.mailbuntu.ServiceM.local,S=1791,W=1830:2,SF"| sed 's/\(.*cur.*2,\)\([PRSTDF]*\) is moved to .*cur\/\(.*2,\)\([PRSTDF]*\)/\3<\2-\4>/g'|sed '/<\(-S\|S-SR\|S-ST\)>/p'
1527241343.M8571P7205.mailbuntu.ServiceM.local,S=1791,W=1830:2,<S-SF>
iwatch -r -e moved_to -X 'dovecot.*|maildirfolder|subscriptions|new|.Sent|tmp|.Drafts' .
iwatch -r -e moved_to -X 'dovecot.*|maildirfolder|subscriptions|new|.Sent|tmp|.Drafts' -c "echo $(date +%s) %f" .
iwatch -r -e moved_to -X 'dovecot.*|maildirfolder|subscriptions|new|.Sent|tmp|.Drafts' -c "php /mail/vmail/sarrc.ru/testmail/php.php %f" .
iwatch -r -e moved_to -c "php /home/sarmailadmin/handlers_for_mail/handler_new.php %f" ./
iwatch -d -f /etc/iwatch/iwatch.xml
/mail/vmail/sarrc.ru/testmail/new
iwatch -r -e moved_to -X 'dovecot.*|maildirfolder|subscriptions|new|.Sent|tmp|.Drafts|.Junk|.Trash' -c "echo $(date +%s) %f" .