希望您能建议我想使用 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/