File Transfer Tutorial

Gradescope Upload

So you've finished working on your exercise/homework files on the CSE Linux environment and you're ready to upload them to Gradescope. What's next depends on your setup:

  • CSE Lab Machines or CSE Linux VM: Open your internet browser of choice (e.g., Firefox), navigate to Gradescope, and upload your files directly from the current machine.
  • attu: You will first need to transfer your files to your local machine. The sections below will cover how to do this from (1) the command line and (2) a GUI application.

Command Line Transfer (scp)

The following examples will assume the following file structure, where NETID is your CSE NetID and user is your username on your local machine.

  • File to be transferred on attu: /homes/iws/NETID/333/ex0.c
  • Directory on local machine for file to be transferred to: C:\Users\user\Documents

Generic scp Command

Any scp command should be run from your local machine because there is no URL/IP address to reach your machine from attu.

scp user@host:/path/to/source-file /path/to/destination-folder
  1. user@host should be NETID@attu.cs.washington.edu
  2. /path/to/source-file can be /homes/iws/NETID/333/ex0.c (absolute path) OR 333/ex0.c (relative path, noting that /homes/iws/NETID is your home directory)
  3. /path/to/destination-folder can be C:\Users\user\Documents (absolute path) OR . if you've navigated your local terminal to that directory)

After typing this command, you will be prompted to enter your CSE password before the file is transferred.

Variations of Interest

  • Adding the -r flag to scp will recursively traverse a source directory and copy it and its contents to the destination.
    • For example, the following command will copy the 333 directory from your attu home directory to your current local directory:
      scp -r NETID@attu.cs.washington.edu:333/ .
  • The * wildcard can be used in the source path to copy all files that match to the destination. Multiple examples given below:
    • The following command will copy all of the files within the 333 directory on attu to your current local directory (note, doesn't copy the 333 folder itself or folders within 333):
      scp NETID@attu.cs.washington.edu:333/* .
    • The following command will copy all of the C source files (i.e., files ending in .c) within the 333/ex1/ directory on attu to your current local directory:
      scp NETID@attu.cs.washington.edu:333/ex1/*.c .
    • The following command will copy all of the text files (i.e., files ending in .txt) from all exercise subdirectories of 333 (i.e., subdirectories starting with ex) on attu to your local directory:
      scp NETID@attu.cs.washington.edu:333/ex*/*.txt .

Graphical User Interface (Cyberduck)

A GUI file transfer tool can be especially helpful when copying many files, entire directories, or when you want to visually confirm what was transferred. Cyberduck uses the same underlying SSH/SFTP protocol as scp; the difference is only the interface.

Installation

  1. Navigate to the Cyberduck website.
  2. Download the installer for your operating system.
  3. Run the installer and complete the installation.
  4. Open the Cyberduck application.

Connecting to attu

  1. Click Open Connection (or File > Open Connection).
  2. Select SFTP (SSH File Transfer Protocol).
  3. Enter the server address: attu.cs.washington.edu
  4. Enter your CSE credentials:
    • Username: your CSE NetID
    • Password: your CSE password
    Cyberduck connection screen showing SFTP connection to attu.cs.washington.edu
  5. Click Connect.

Opening a Local File Browser

  1. Open a second browser window using File > New Browser.
  2. In the new browser, choose Open Connection > Local to browse your local filesystem.

You should now have one Cyberduck browser window for the remote attu server and one for your local machine. Files can be transferred between them using drag and drop.