EECS268:Submission
Navigation |
---|
Home |
Information |
Classwork |
Labs |
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 files you want to submit: lab20.cpp, lab20.h, and output.txt. First, create a folder for the files you want to submit. The folder should be named like LastName-KUID-Assignment-Number:
- mkdir Smith-123456-Lab-20
Now, copy the files you want to submit into the folder:
- cp lab20.cpp Smith-123456-Lab-20
- cp lab20.h Smith-123456-Lab-20
- cp output.txt Smith-123456-Lab-20
Tar everything in that directory into a single file:
- tar -cvzf 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
- v: operate in verbose mode (show the name of all the files)
- z: zip up the files to make them smaller
- 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. You can view the contents of a tarball by using:
- tar -tvzf filename.tar.gz
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 268] 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 268] Lab 20. Your TA will reply to the message with your grade.