You need to scp
something somewhere.
(你需要在某个地方scp
。)
You have scp ./styles/
, so you're saying secure copy ./styles/
, but not where to copy it to. (你有scp ./styles/
,所以你说安全副本./styles/
,但不是在哪里复制它。)
Generally, if you want to download, it will go:
(一般来说,如果你想下载,它将会:)
# download: remote -> local
scp user@remote_host:remote_file local_file
where local_file
might actually be a directory to put the file you're copying in. To upload, it's the opposite:
(其中local_file
实际上可能是放置您正在复制的文件的目录。要上传,则相反:)
# upload: local -> remote
scp local_file user@remote_host:remote_file
If you want to copy a whole directory, you will need -r
.
(如果要复制整个目录,则需要-r
。)
Think of scp
as like cp
, except you can specify a file with user@remote_host:file
as well as just local files. (可以将scp
视为cp
,除了可以使用user@remote_host:file
以及本地文件指定文件。)
Edit: As noted in a comment, if the usernames on the local and remote hosts are the same, then the user can be omitted when specifying a remote file.
(编辑:如注释中所述,如果本地和远程主机上的用户名相同,则在指定远程文件时可以省略用户。)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…