ftp脚本

if [ $# -ne 2 ]; then
echo "input srcPath targetPath"
echo "usa $0 /data/ansible/changePD/payCenter/public/ /apps/pay_center/conf/app/public"
exit
fi

ip='XXXX'
port=30000
userN='pay_center'
pass='XXXXX'
fileName='database.properties'
ftp -n<<!
open $ip $port
user $userN $pass
binary
hash
prompt off
lcd $1
cd $2
ls $fileName
mput $fileName
ls $fileName
close
bye
!

posted on 2022-03-24 14:33  hello_dg  阅读(61)  评论(0)    收藏  举报