CS Lab: Copying files between accounts or computers

Note that if your files make up a Mercurial (hg) repository, you probably want to use Mercurial-specific ways to copy them.

Copying files between accounts

You may want to copy files between an in-lab account and your personal account, or you might want to copy files to/from a partner's account. A fairly easy way to do that is to use the file browser and SSH. You can also do it using the command line.

In these examples, we'll assume that you are logged in under one of the class accounts, and that the other account that you want to copy to or from is for the user named mortimer.snerd. (Substitute your username.)

  1. In the Places menu (in the top bar), select Home folder to open a window. Browse to the folder/directory in this account where you want to copy.
  2. Again, in the Places menu, select Connect to server. In the dialog that pops up, All that effort gets you another browser window, but this one is for the home directory of mortimer.snerd.
  3. Navigate in this new window to where you want to put/get the files. You may want to make a new folder for just this lab.
  4. Use the mouse to select the files you want in one window and copy them to the other.

When you're done, disconnect the other home directory. You should see what looks like an "eject" icon next to it in the bar down the left side of the window; click that to disconnect it. (Don't just close the window.)

Copying at the command line

You can also copy files (not directories or folders) using the command scp. To copy the file myfile from the current directory to the directory csci235/work in Mortimer Snerd's account, you would use the command

$ scp myfile mortimer.snerd@cslab25:csci235/work/

Mortimer will, of course, have to provide his password when prompted.

Copying files between the lab and your own computer

It will be easiest to copy files from the lab to your own computer when you are sitting at your computer. To do that, you will need to have suitable software on your computer. If you have a Mac, you might want to try the program Fugu; on MS Windows you might try the FileZilla client.

You will need to connect your copying program to any of the lab computers (e.g. cslab00, or, if you are off-campus, csgate) using SSH (sometimes called SCP or SFTP). If you need to specify an initial directory, your home directory (or folder) is named as above, /homes/mortimer.snerd.


Cary Gray
Last modified: Thu Sep 25 07:49:00 CDT 2014

Valid HTML 4.01!