Copying from UNIX-like environment (Linux, Mac OS X, Cygwin/MingW)

Prerequisite

To use examples in this section your ssh environment must be configured and an agent must be running.

Copying files back and forth

With your agent running, copying files is easy with, for instance the scp command and the rsync command. The former works exactly like the cp command, except that it works across the network to copy files from one computer to another. A command like

scp -r mydir/ hmem:

will copy directory mydir on your personal computer to your home directory on the cluster hmem. If your login on the cluster is not the same as the one on your local computer, and you did not specify your login for hmem in your config file, make sure to specify your login on hmem with something like the following.

scp -r mydir/ mylogin@hmem:

In the case you are not using an ssh agent and your .ssh/config is not configured, you will need to add the -i .ssh/id_rsa.ceci option to the command line.

You can also use the rsync command. The later is more intelligent in the sense that it only copies what is needed to be copied in the case the target directory already exist and contains unchanged files. Click here for some examples.