小陆同学

python 中文名:蟒蛇,设计者:Guido van Rossum

导航

shell--将文件上传至ftp

HOST='xx.xx.xx.xx'
USER='xx'
PASSWD='xxxx'
file_name="as.txt"
#
ftp -v -n ${HOST}<<EOF
user ${USER} ${PASSWD}
binary
# ftp路径
cd /home/deploy
# 本地路径
lcd /root/backup
prompt
put ${file_name}
bye
#here document
EOF
echo "commit to ftp successfully"

 

posted on 2022-05-07 19:38  小陆同学  阅读(248)  评论(0编辑  收藏  举报