Suppose you want to move files between two separate machines, for example, a lab PC andattu
. You can do that usingscp
.scp
operates 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 toattu
as userj2
, and then copies the filemyLocalFile
toj2
'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.,j2
in the previous example), copiesmyLocalFile
to your home directory onattu
.
scp cse303/hw3.tar.gz attu:homework/j-2-hw3.tar.gz
Copies the local file toattu
as the file namedj-2-hw3.tar.gz
in directory~/homework
.
scp -r ~/bin attu:
Copies the local directory~/bin
and (recursively) all of its contents to your home directory onattu
Moving 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 acygwin
window. You may already have (and certainly can find) programs that put a graphical front-end onscp
if 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
,scp
and the like work,telnet
,rsh
,rcp
and their ilk do not.