脚本远程上传文件

#!/bin/bash
local_dir=$1
target_dir=$1
user=root
password=password
serverip=ip

lftp -c "open -u $user,$password sftp://$serverip ; mirror -R --delete $local_dir $target_dir"

lftp也支持ftp协议:

 

发表评论?

0 条评论。

发表评论


注意 - 你可以用以下 HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>


Warning: Use of undefined constant XML - assumed 'XML' (this will throw an Error in a future version of PHP) in /opt/wordpress/wp-content/plugins/wp-syntaxhighlighter/wp-syntaxhighlighter.php on line 1048