#!/bin/sh backupserver=$1 #localdir=ftp_result_tmp username=$3 password=$4 #remodir=‘./Log/2018-01-29‘ port=$2 localdir=$6 remodir=$5 ftp -v -n $backupserver $port << EOF user $username $password binary lcd $localdir cd $remodir prompt mput * bye EOF
-----ftp命令--------------------
delete 删除文件
MDELETE * 删除所有文件
rmdir 删除文件夹
put 上传文件