LINUX rsync-demo
#!/bin/sh inotifywait -mrq --timefmt '%d/%m/%y %H:%M' --format '%T %w%f' -e modify,delete,create,attrib /www/rsync-demo/ | while read file do rsync -avPz -e 'ssh -p 528' --progress /www/rsync-demo/ 43.129.245.90:/www/rsync-demo/ rsync -avPz -e 'ssh -p 528' --delete /www/rsync-demo/ 43.129.245.90:/www/rsync-demo/ echo "${file} was synchronized" done