shell如何将文件上传至ftp

#!/bin/bash
file=$1
ip=$2
port=$3
user=$4
pwd=$5
/usr/bin/lftp -p $port $ip <<EOF
user $user $pwd
set ftp:ssl-auth SSL
set ftp:ssl-allow true
set ftp:ssl-force true
set ftp:ssl-protect-data true
set ftp:ssl-protect-list true
cd devilfish
put $file
quit
EOF

 

posted on 2015-05-06 16:04  大油蛙  阅读(400)  评论(0编辑  收藏  举报

导航