我在远程remote_host文件中有这样的文件:
\home\user\path with spaces\filename with spaces.ext
我想要scp它到当前 dir .。我怎样才能做到这一点?
谢谢!
Ric*_*Bou 14
经过一番调查,我找到了这两个选项:
scp 'user@remote_host:"/home/user/path with spaces/filename with spaces.ext"' .
和
scp 'user@remote_host:/home/user/path\ with\ spaces/filename\ with\ spaces.ext' .
我希望它也能帮助你!
玩得开心!
编辑 - openssh 更新了一项安全功能,该功能会导致路径名中的某些字符出现错误消息“协议错误:文件名与请求不匹配”。在这种情况下,使用 scp 的新-T选项将允许它工作。例如
scp -T 'user@remote_host:"/home/user/path with spaces/filename with spaces and (2018).ext"' .
这在/sf/answers/3821952851/ 中有解释
| 归档时间: |
|
| 查看次数: |
10250 次 |
| 最近记录: |