Submitting Homework with Gsubmit


To submit homework assignments, use gsubmit, which is available on the general Linux login nodes and

The gsubmit program is an electronic file submission engine that you will use to submit files (or directories of files) to the grader so that they can be marked.

Every file submitted by a given student for a given assignment should have a unique name. If a file is submitted with a duplicate name it will either overwrite the file or generate an error message.

To make it easy for the grader to find the files relating to a specific homework assignment, all files for each assignment should be stored in a subdirectory corresponding to the assignment number (e.g., hw1, hw2, etc.) Then, this entire directory should be submitted.

Where do submitted files go?

Each student who submits assignments has a separate subdirectory created to hold his files under the submit directory for the specified course. This is called the student's "submission spool directory".

To submit a homework assignment:

  1. Create a subdirectory for the homework. For example, assignment 1's directory should be hw1. Creating a directory can be done using the mkdir command, e.g.:
    mkdir hw1

  2. Copy all files necessary for that homework assignment into the new subdirectory, using the cp command, e.g.:
    cp prob1.txt prob1.cpp hw1

    Be sure to copy only the files you need to submit into this subdirectory.

    If the directory contains other files (like Emacs backup files, which end in ~), the submission will fail if your instructor has restricted what files you can submit. You should remove inappropriate files from the directory (or move them somewhere else) in order to submit the directory with only those file required for the assignment.

  3. Use gsubmit to submit the entire subdirectory, e.g.:
    gsubmit  hw1
    If submission is successful, a message to that effect will be printed.

    Aside: The first time you submit something for a course, gsubmit will ask you for some information.

To submit a file to an already-submitted subdirectory:

Sometimes you will have already submitted part of the assignment and would like to add another file.

E.g., to add the file myfile.cpp to subdirectory hw1, type:

gsubmit  -cp myfile.cpp hw1

To resubmit a file:

Sometimes you will want to resubmit a file that you already submitted but have updated.

E.g., to resubmit a file myfile.cpp in subdirectory hw1, first unsubmit the file:

gsubmit  -rm hw1/myfile.cpp

The gsubmit -rm operation will ask you to confirm deleting the file from your submission spool directory.

Then, resubmit it:

gsubmit  -cp myfile.cpp hw1

To view submitted files:

To list all files that you have submitted, type:
gsubmit  -ls

To look at a file that has already been submitted, type:

gsubmit  -cat hw1/myfile.cpp

You could store this in a file foo by typing:

gsubmit  -cat hw1/myfile.cpp > foo

The -cat option allows you to see exactly what the grader will see. You must use this option to check that you have correctly submitted your work. Credit will not be given for work that you intended to submit, but rather only for the work that you actually did submit.

How can the grader tell when a file has been submitted?

Every gsubmit command is automatically logged with a a time stamp.

For further information:

Look up gsubmit in the Manual Pages by typing man gsubmit.

BU CAS CS - Submitting Homework with Gsubmit
Copyright © 2000 by Robert I. Pitts <rip at bu dot edu>. All Rights Reserved.
Based on web page by Dave Metcalf <>
with additional contributions by Drue Coles <>