rsync -avzP /www/ -e ssh root@192.168.1.200:/www/
批处理上传:
#!/bin/bash for (( ; ; )) do rsync -avzP /www/www.site.com/public_html/ -e ssh root@ip:/www/www.site.com/public_html/ > run.log 2>&1 if [ $? -eq 0 ] then echo "Rsync was completed successfully..!" break fi done