#!/bin/bash
( echo "connect -u ${username},${password} sftp://${IP}:${Port}"
echo "cd ${remote_path}"
echo "lcd ${local_path}"
echo "mirror --parallel=3 ${sync_path_name}"
echo "bye")|lftp
#相关变量可以换成实际的
服务器信息,也可以从单独的配置文件中获取相关信息
当前名称:shell脚本-通过lftp同步远端目录到本地
转载来于:
http://cqcxhl.cn/article/jcpgjs.html