file_path=$1
relative_path=${file_path:31} # len('/Users/yao.yao/Downloads/repos/')=31
echo `date` "rsync code:" ${file_path}
# remote
rsync -ru -e "ssh -i mengmai.pem" /Users/yao.yao/Downloads/repos/${relative_path} hadoop@ec2-13-233-83-154.ap-south-1.compute.amazonaws.com:/mnt/yaoyao/repos/${relative_path}
echo `date` "rsync code done:" ${file_path}