问题
在阿里云使用docker-machine scp进行复制的时候报这个错误:
scp: illegal option -- 3
usage: scp [-1246BCpqrv] [-c cipher] [-F ssh_config] [-i identity_file]
[-l limit] [-o ssh_option] [-P port] [-S program]
[[user@]host1:]file1 ... [[user@]host2:]file2
exit status 1
解决
在参数上加-d。具体为什么没看出来,因为我在mac上是可以不加的
docker-machine scp -d manager1:/root/docker .
参数解释Options:
–recursive, -r Copy files recursively (required to copy directories)递归创建,传目录的时候加上
–delta, -d Reduce amount of data sent over network by sending only the differences (uses rsync)只传输不同的部分
–quiet, -q Disables the progress meter as well as warning and diagnostic messages from ssh