linux - 使用 bash rsync 远程站点

标签 linux macos bash ftp rsync

希望您能建议我想使用 rsync 来执行我的 FTP 事务,但要使用 bash。

如何将密码添加到 rsync 命令。

我有例子。

rsync -r -update user@domain.com:/public_html/ /var/www/domin.com/public_html

希望大家指教。

提前谢谢你。

最佳答案

来自 man rsync:

Some modules on the remote daemon may require authentication. If so, you will receive a password prompt when you connect. You can avoid the password prompt by setting the environment variable RSYNC_PASSWORD to the password you want to use or using the --password-file option. This may be useful when scripting rsync.

关于linux - 使用 bash rsync 远程站点,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1122324/

相关文章:

配置:错误:C 编译器无法创建可执行文件 (OSX El Capitan)

cocoa - 将 NSMenu 命令传输到当前窗口?

python - os X 上的 virtualenv 错误

在 ubuntu 16 : set -e not inheriting inside subshell 上 bash

linux - 使用 while 循环时的 Bash 退出状态

java - 以编程方式从java调用Linux终端中的python脚本

java - 使用通过 apt 安装的 java 库

r - 谁能帮我解决这个 crontab?

c - 原始套接字/BPF - 过滤完成一次还是多次?

linux - 使用 Netcat 将二进制文件(逐行)发送到套接字服务器