If you don't know about scp ,
then today is your lucky day. It is a great tool for copying file around.
In the following examples, here are the terms I will use:
remotebox is the IP address or hostname of the remote box.
Here are a few pratical examples to help you get started:
- copy a file to a remote system:
scp a remotebox:
- copy a file to a remote system, and put it somewhere other than your home directory:
scp a remotebox:/var/tmp
That will copy a from your current working directory to
/var/tmp on the remote box.
- copy a file to a remote system but a different user id:
scp a mark@remotebox:
- copy file from a remote system:
scp remotebox:a .
- copy file from a remote system, different login:
scp mark@remotebox:a .
- copy recursively from a remote system, different login:
scp -r mark@remotebox:a .
- copy a number of files from a remote system to a specified directory locally:
scp remotebox:\{a,b,c\} ~/my/secret/dir
If you have more good ideas about scp, please put them in the article comments. Thank you.
|