next up previous contents
Next: Between UNIX and the Up: Copying files Previous: On the same system   Contents

Between UNIX systems (rcp)

To copy from one UNIX machine to another use the rcp command. You may need to set up permission allowing you to access the remote machine. This is done by putting a ``.rhosts'' file in your login directory on the other system. You want to put the name of other machines and your account name on them in the ``.rhosts'' file.

malama% cd /home/bbaggins
malama% cat > .rhosts
lehua bbaggins
malama bilbo
^D
malama%

rcp has the same syntax as the cp command, except one puts the system name in the file specification followed by a ``:''.

malama% cd /home/bbaggins
malama% rcp lehua:/home/bbaggins/.login .login

If you wish to rcp using wildcards (``*'' or ``?'') you will have to ``escape'' the wildcard character using a backslash. E.g.

malama% cd ~/programs
malama% rcp lehua:/home/bbaggins/programs/$\backslash$*.f .

Note the final ``.'' in this statement, indicating the current directory as the destination.

Do not worry too much about using rcp at the JAC, since most of the systems have been set up so that you have the same home directory on every system, and an account there as well. This means that you automatically have access between the systems, and will generally not need to copy files between them since the host computers share the disks and, hence, the filesystems on them. The only time you might need it is if you have a private workstation with its own local disk where you keep files.


next up previous contents
Next: Between UNIX and the Up: Copying files Previous: On the same system   Contents
h.stilmack@jach.hawaii.edu