标签:inotify
#!/bin/sh
src=/backup
des=zq
rsync_passwd=/etc/web.passwd
ip=192.168.1.127
user=zq
cd ${src}
/usr/local/inotify-tools/bin/inotifywait -mrq --format ‘%w%f‘ -e modify,create,delete,attrib,close_write,move ./ |while read line
do
rsync -avzR --timeout 100 --password-file=${rsync_passwd} $line ${user}@${ip}::${des} &>/dev/null
done
本文出自 “运维小王子” 博客,请务必保留此出处http://superzhangqiang.blog.51cto.com/6399950/1759192
标签:inotify
原文地址:http://superzhangqiang.blog.51cto.com/6399950/1759192