用lftp命令把本地的目录文件传到sftp服务器上。请帮忙写一下脚本
时间: 2024-05-19 14:13:01 浏览: 87
#!/bin/bash
HOST="sftp.example.com"
USER="username"
PASSWORD="password"
LOCALDIR="/path/to/local/directory"
REMOTEDIR="/path/to/remote/directory"
lftp -c "open -u $USER,$PASSWORD sftp://$HOST; mirror -R $LOCALDIR $REMOTEDIR"
阅读全文