EECS168:Submission

From ITTC
Jump to: navigation, search
Navigation
Home
Information

Syllabus
Schedule
Exam Reviews

Classwork

Labs
Submitting Work


Using tar

tar is the standard Unix utility for created archived files. Tar files, often called tarballs, are like zip files. You will be using tar to submit your work for labs and homework.

Let's assume for this example that you have just completed Lab 20. There are three folder you want to submit: exercise1, exercise2, and exercise3. First, create a folder for the files you want to submit. The file should be named like LastName-KUID-Assignment-Number:

mkdir Smith-123456-Lab-20

Now, copy the folders you want to submit into the folder:

cp -r exercise1 Smith-123456-Lab-20
cp -r exercise2 Smith-123456-Lab-20
cp -r exercise3 Smith-123456-Lab-20

Tar everything in that directory into a single file:

tar -czvf Smith-123456-Lab-20.tar.gz Smith-123456-Lab-20

That single command line is doing a number of things:

  • tar is the program you're using.
  • -cvzf are the options you're giving to tar to tell it what to do.
    • c: create a new tar file
    • z: zip up the files to make them smaller
    • v: operate in verbose mode (show the name of all the files)
    • f: create a file
  • Smith-123456-Lab-20.tar.gz: the name of the file to create. It is customary to add the .tar.gz extension to tarballs created with the z option.
  • Smith-123456-Lab-20: the directory to add to the tarball

Please note that it is your responsibility to make sure that your tarball has the correct files.

  • Never put .o files or executable file in your tarball
  • Doing so will result in your email being blocked and will never reach your TA or myself


Viewing contents of tar file

ou can view the contents of a tarball by using:

tar -tzvf filename.tar.gz

Untaring

You can untar a tarball to extract its contents using:

Extract to current directory:

$> tar -xzvf ''filename.tar.gz'' 


Extract to current path:

$> tar -xzvf ''filename.tar.gz'' -C /home/username/some/folder/path

Emailing Your Submission

Once you have created the tarball with your submission files, email it to your TA. The email subject line should look like:

[EECS 168] Submission Name

It is your responsibility to make sure you are including the correct subject line and correct attachments. It is recommended that you CC yourself on the e-mail to make sure you have submitted everything correctly.

So for the example above, the subject line would be: [EECS 168] Lab 20. Your TA will reply to confirm the submission and later with your grade.


Some TAs will be using blackboard. Make sure to ask your TA where to submit your tarball