Suppose you want to move files between two separate machines, for example, a lab PC andattu. You can do that usingscp.scpoperates a lot likecp, but with the important distinct that the former knows there's more than one machine in the world and the latter does not.Moving files from your local machine to a remote machine
scp myLocalFile j2@attu:
Connects toattuas userj2, and then copies the filemyLocalFiletoj2's home directory there.
scp myLocalFile attu:
IF your login name on the local machine is the same as your login name onattu(e.g.,j2in the previous example), copiesmyLocalFileto your home directory onattu.
scp cse303/hw3.tar.gz attu:homework/j-2-hw3.tar.gz
Copies the local file toattuas the file namedj-2-hw3.tar.gzin directory~/homework.
scp -r ~/bin attu:
Copies the local directory~/binand (recursively) all of its contents to your home directory onattuMoving files from a remote machine to your local machine
Do the same things as above, just reverse the order of the arguments.Note
The explanation above was for using command linescp, e.g., in acygwinwindow. You may already have (and certainly can find) programs that put a graphical front-end onscpif you prefer.No matter what, though, you won't be able to connect to or transfer files to the department's Linux machines unless the tool you're using employs secure connections:
ssh,scpand the like work,telnet,rsh,rcpand their ilk do not.