SCP command in linux
by Ranganathan[ Edit ] 2012-08-27 17:04:59
The syntax for the scp command is:
scp [options] [[user@]host1:]filename1 ... [[user@]host2:]filename2
For example
if user dvader is on a computer called empire.gov, and wants to copy a file called file1.txt to a directory called somedir in his account on a computer called deathstar.com, he would enter:
scp file1.txt dvader@deathstar.com:somedir
Likewise, if he wanted to copy the entire contents of the somedir directory on deathstar.com back to his empire.gov account, he would enter:
scp -r dvader@deathstar.com:somedir somedir