Guest User

Untitled

a guest
Nov 22nd, 2018
163
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.11 KB | None | 0 0
  1. # Copy the file "foobar.txt" from a remote host to the local host
  2. scp your_username@remotehost.edu:foobar.txt /some/local/directory
  3.  
  4. #Copy the file "foobar.txt" from the local host to a remote host
  5. scp foobar.txt your_username@remotehost.edu:/some/remote/directory
  6.  
  7. #Copy the directory "foo" from the local host to a remote host's directory "bar"
  8. scp -r foo your_username@remotehost.edu:/some/remote/directory/bar
  9.  
  10. #Copy the file "foobar.txt" from remote host "rh1.edu" to remote host "rh2.edu"
  11. $ scp your_username@rh1.edu:/some/remote/directory/foobar.txt \your_username@rh2.edu:/some/remote/directory/
  12.  
  13. #Copying the files "foo.txt" and "bar.txt" from the local host to your home directory on the remote host
  14. $ scp foo.txt bar.txt your_username@remotehost.edu:~
  15.  
  16. #Copy the file "foobar.txt" from the local host to a remote host using port 2264
  17. $ scp -P 2264 foobar.txt your_username@remotehost.edu:/some/remote/directory
  18.  
  19. #Copy multiple files from the remote host to your current directory on the local host
  20. $ scp your_username@remotehost.edu:/some/remote/directory/\{a,b,c\} .
  21. $ scp your_username@remotehost.edu:~/\{foo.txt,bar.txt\} .
Add Comment
Please, Sign In to add comment