我很困惑,为什么rsync需要–rsync-path标志,即使远程rsync在path中。
考虑:
$ rsync -avze 'ssh -p 22' --delete public/ [email protected]:~/public_html bash: /usr/local/bin/rsync: No such file or directory rsync: connection unexpectedly closed (0 bytes received so far) [sender] rsync error: remote command not found (code 127) at io.c(601) [sender=3.0.7]
然后我试着添加–rsync-path
$ rsync -avze 'ssh -p 22' --rsync-path=/usr/bin/rsync --delete public/ [email protected]:~/public_html sending incremental file list ...
所以,第一个rsync是不成功的,因为它在/ usr / local / bin中searchrsync,但只要我使用–rsync-path传递rsync的明显path,那么它就可以工作。
为什么是这样? (这个命令行是八进制数中rake deploy发出的命令)
我的记忆现在很模糊,但是发生这种情况的原因是我在某处使用了rsync上的GNU stow,并创build了一些混淆rsync位置的符号链接。 这是经过多次拉毛后分类的。 我现在头发上更轻,但另一方面,我有一个工作的rsync 。 如果你问我,那一定是胜利。