chore-tools/lftp.sh

17 lines
230 B
Bash

#! /bin/bash
#服务器
host=$1
#ftp用户名
user=$2
#ftp密码
password=$3
#要上传的文件夹
localdir=$4
#目标文件夹
remotedir=$5
lftp -u $user,$password $host<<EOF
mkdir $remotedir
mirror -R $localdir $remotedir
EOF