deploy_conf=/home/zcy/download/oldhuman.txt
basepath=/data/apps/aging_data/PBMC
for srcimage in `tac $deploy_conf`
do
        date
        echo $srcimage
    num=$(echo $srcimage |awk -F '/' '{print $1}')
        echo $num
        mkdir -p /opt/zcy/$num 
        rsync -av --partial --progress  -e 'ssh -p 端口' 密码@IP:$basepath/$srcimage /opt/zcy/$num
        # scp -P 端口 密码@IP:$basepath/$srcimage /opt/zcy/$num

     
done
#!/bin/sh
#while true
#do
cd /mnt/vfw/third_meteor
for sub in `ls`
do
        cd /mnt/vfw/third_meteor/${sub}/GRIDFILE
        for file in `ls |grep back`
        do
                cd /mnt/vfw/third_meteor/${sub}/GRIDFILE/${file}
                for pvd in `ls -lrt | grep ^d | awk '{print $9}'`
                do
                        cd /mnt/vfw/third_meteor/${sub}/GRIDFILE/${file}/${pvd}
                        if [ -d /home/centos/mnt/vfw/third_meteor/${sub}/GRIDFILE/${file}/${pvd} ];
                        then
                                for file_last in `ls -rlt *.PVD|tail -n 3 | awk '{print $9}'`
                                do
                                        echo ${file_last}
                                        #cp -rp *.PVD /home/centos/mnt/vfw/third_meteor/${sub}/GRIDFILE/${file}/${pvd}
                                        cp -rp $file_last /home/centos/mnt/vfw/third_meteor/${sub}/GRIDFILE/${file}/${pvd}
                                done
                        else
                                mkdir -p /home/centos/mnt/vfw/third_meteor/${sub}/GRIDFILE/${file}/${pvd}
                        fi

                done
        done


done
#sleep 900
#done

  shell 脚本示例 rsync_centos