#监视目录和目标目录
FROM_DIR="/www/wwwroot/localhost.com/data.sql"
while true
do
inotifywait -mrq --timefmt ‘%d/%m/%y-%H:%M‘ --format ‘%T%w%f‘ -e modify $FROM_DIR | while read eventName dirName fileName; do
echo $eventName >> dbimport.log
sh /root/dbimport.sh
done
done