[CSC 335] Email and Tar Files in Cobra
Andrew J. Pounds
pounds_aj at mercer.edu
Sun Sep 8 09:03:43 EDT 2013
Levi -- I am going to partially answer your question by sending you to a
web page that explains the purpose and use of tar files.
http://www.cs.duke.edu/~ola/courses/programming/tar.html
Rather than sending me a bunch of files individually, you send me one
file that contains your code as well as your directory structure so I
can recreate it in my own workspace. This way you are able to send me
your code, your input files, and anything else necessary to build and
execute your programs.
I will demonstrate their use again in class on Monday -- and how to send
them via e-mail on Cobra. Tar has MANY options and is used
ubiquitously in Unix computing (type "man tar" on cobra to access the
online manual). However, we are going to do something quite simple,
just use the tar command to create a tar file.
Let's say you have a directory called csc335/hw1 on cobra. In this
directory you have a collection of programs you need to turn in. Change
directories to csc335 and type
tar -cvf hw1.tar hw1
This will create a file called hw1.tar
I also prefer that files sent to me via e-mail be compressed. For that
you should use the gzip utility found on almost all unix systems.
gzip --best hw1.tar >hw1.tgz
Or -- to do it all in one line with Unix pipes...
tar -cvf - hw1 | gzip --best - >hw1.tgz
To mail the file to me on cobra
mail -a hw1.tgz pounds
You will be asked for a subject -- please fill it in. The mail program
will then present you with a blank line
for you to type the body of your e-mail. Fill this in as appropriate.
When you are done composing your message, hit <CTRL>-D to end the
message and mail it.
On 09/07/13 21:25, wrote:
> Hi Dr. Pounds,
>
> I just tried to create tar files and send you an email in Cobra but
> wasn't able to. I followed the instructions you gave us a few weeks
> ago that I'd written down in my notes, but perhaps I wrote them down
> wrong. Could you email me the commands necessary to create tar files
> and email them to you? Also, what exactly are tar files and what
> should I make tar files out of? Should I make one tar file for the
> source code of each program? Or should I make one tar file that holds
> the source codes for both programs? I don't really know what the
> purpose of using the tar file is or how they work exactly.
>
> Also, would you like me to print my spreadsheet for the Fibonacci
> comparisons? Or would you like me to just email it to you?
>
> Thanks,
>
--
Andrew J. Pounds, Ph.D. (pounds_aj at mercer.edu)
Professor of Chemistry and Computer Science
Mercer University, Macon, GA 31207 (478) 301-5627
http://faculty.mercer.edu/pounds_aj
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://theochem.mercer.edu/pipermail/csc335/attachments/20130908/e6ff7bcf/attachment.html>
More information about the csc335
mailing list