是的,我不知道它已被要求的千倍如何逃生空间在SCP,但我不能这样做与& - 符号,因此,如果这标志是部分目录名称。如何逃生和在SCP
[[email protected] tmp]$ scp test.txt "bpi:/home/sorunome/test & stuff"
zsh:1: command not found: stuff
lost connection
的&迹象似乎搞乱的东西相当多了,使用\ &不能解决的则远程目录中找不到问题:通过省略
[[email protected] tmp]$ scp test.txt "bpi:/home/sorunome/test \& stuff"
scp: ambiguous target
甚至不引用和加\这个工作的地方:
[[email protected] tmp]$ scp test.txt bpi:/home/sorunome/test\ \&\ stuff
zsh:1: command not found: stuff
lost connection
那么,有什么想法吗?
必须使用的zsh?我在bash下试了一下,它没有任何额外的转义。 – Aaron
不,我不必使用zsh,我只是用bash试过它,并且它产生相同的效果(而不是它说“zsh:1”它现在说“bash”) 另外,只是为了如此感兴趣只是试过'scp test.txt“bpi:/ home/sorunome/test&touch test.tmp”' ,它确实在我的远程家庭中创建了test.tmp文件! – Sorunome
是的,我实际上已经在本地测试'&',当在远程端测试时,我重现了你的错误。我正在寻找一种方法来避免它 – Aaron