Copy the directory "foo" from the local host to a remote host's directory "bar"
scp -r foo your_username@remotehost.edu:/some/remote/directory/bar
The -r tells it to copy recursively.
質問
I want to send the following files from my computer to a remote computer using scp
.
Directory1
File1
File2
Directory2
File3
File4
...
How can I send File1
, File2
, etc. such that they are saved to the same directories on the remote computer as they are on my computer (e.g. Directory1
and Directory2
are created on the remote computer and Directory2
contains File3
and File4
)?
解決
Copy the directory "foo" from the local host to a remote host's directory "bar"
scp -r foo your_username@remotehost.edu:/some/remote/directory/bar
The -r tells it to copy recursively.