Unix scp

The scp command is used to transfer files to and from a remote machine.

To illustrate the scp utility, suppose you have a file called exercise01 in your subdirectory a01 (in your home directory) under your Physics account with username zeke and your want to copy it into the current directory of your local machine. You do this with the command

   scp "zeke@physics.utah.edu:a01/exercise01" .
Be sure to notice the colon and dot. The dot specifies the current directory. The colon separates the name of the machine from the directory and file. Since you are specifying your account, all relative paths start from your home directory. You will be prompted for your password before the file is transferred. The quotes for the specification of the remote file name aren't really necessary here, but if you use wild cards, e.g. exercise?? they are.

To reverse this copy, sending a file named exercise01 on the local machine in the current directory to your Physics account in the subdirectory a01 you use the command

   scp exercise01 zeke@physics.utah.edu:a01
It should be evident that the scp command behaves very much like the plain Unix cp command.