Copying files to/from the CCH Computational Resources:

Here are some instructions for copying files from the server. The instructions below assume that you have already obtained access to the server and set up your ssh keys.

To copy files from the Lethbridge server to your local computer, you can use the secure copy program ('scp'). This program is available on Linux, Windows and Macs and can be used from the command line by opening a terminal window first. The syntax is as follows: to copy one or more files from a single directory:

   scp destinationfile
The sourcefile can include a user account and server, for example, if you have a file called myfile.txt in your home directory on the server, you could copy it like this:
   scp .
Don't forget the trailing dot, it is a shortcut for the destinationfile if you don't want to change the file's name. In this case, it just means that you copy the file into the current directory from which you are issuing the command. So 'cd' into the desired directory on your home computer first, and then issue the command from there.

If you want to copy multiple files from the computer, you can use wildcards:

   scp* .   
this would copy all files that start with 'myfile.'. Or to grab all files in a subdirectory, use:
   scp* .   
If you want to copy an entire directory and its contents recursively, you can use the '-r' flag (for example, subdirectory dir2 in dir1:
   scp -r .
(For Windows directories use backslashes instead)

You can also use scp to copy files from your computer to the server by using the local filename for the sourcefile and the remote file for the destinationfile:

   scp myfile.txt
or again, just use the trailing dot, this time without a space in between:
   scp myfile.txt
or using recursive mode for an entire directory:
   scp -r dir
Like any good utility under Linux, scp has lots of options, to get more details on the program, look up the manual page (man scp) on the server, or search google.