scp遇到路径中有空格

sudo scp root@1.1.1.1:/test/soft/123/Microsoft SQL Server 2000.iso .      错误!

sudo scp root@1.1.1.1:"/test/soft/123/Microsoft SQL Server 2000.iso" .     错误!

sudo scp root@1.1.1.1:/test/soft/123/Microsoft SQL Server 2000.iso" .     错误!

sudo scp root@1.1.1.1:"/test/soft/123/Microsoft SQL Server 2000.iso" .     错误!

正确方法是:

sudo scp root@1.1.1.1:"/test/soft/123/Microsoft\ SQL\ Server\ 2000.iso" .

也就是说

1、需要用括号(是双引号)把路径扩起来。

2、需要在空格前加两个

原文地址:https://www.cnblogs.com/mafeng/p/9212220.html