#!/bin/bash
dir="${1}"
inotifywait -mrq --timefmt '%d/%m/%y %H:%M' --format '%w%f' --event CLOSE_WRITE,delete --exclude '.svn' $dir | while read file
do
if [ "${file: -4}" != '4913' ] && [ "${file: -1}" != '~' ]; then
php /sync.php $file
fi
done
网友评论