Posted December 18, 2016
Examples:
Copy the file “foobar.txt” from a remote host to the local host:
1 2 3 |
scp your_username@remotehost.edu:foobar.txt /some/local/directory |
Copy the file “foobar.txt” from the local host to a remote host:
1 2 3 |
scp foobar.txt your_username@remotehost.edu:/some/remote/directory |
Copy the directory “foo” from the local host to a remote host’s directory “bar”:
1 2 3 |
scp -r foo your_username@remotehost.edu:/some/remote/directory/bar |
Copy the file “foobar.txt” from remote host “rh1.edu” to remote host “rh2.edu”:
1 2 3 |
scp your_username@rh1.edu:/some/remote/directory/foobar.txt \ your_username@rh2.edu:/some/remote/directory/ |
Copying the files “foo.txt” & “bar.txt” from the local host to your home directory on the remote host:
1 2 3 |
scp foo.txt bar.txt your_username@remotehost.edu:~ |
Speak Your Mind