Sunday, August 2, 2009

Need help emailing a file using Linux?

O.k. so i just started a C programming class and our teacher wants us to use Linux and the system emacs to write the program. I have written the program in emacs and saved it. I have loged into my school's linux account using linux. I created a directory I have compiled my program as well as run it. He wanted us to create a gzipped tar archive of the assignment and I did so using the following command:


$ tar cbfz lastname-hw0.tar.gz lastname-hw0/





Now all he says in the instructions is email me this file... my question is. How do I email his this file!

Need help emailing a file using Linux?
Lots of ways! You could use a command-line mail client like Mutt or Pine - sortof like an ordinary graphical mail client. Or you could use "mail" utility, something like:





mail user@host.tld





which will then prompt you for cc, subject, then put you into the message pane. There you put:


~r lastname-hw0.tar.gz


which will insert the file, then a '.' alone on a line will send it. That's pretty complex. Probably the easiest way is to scp or sftp it to your desktop and mail it as you might usually.





Good luck!


No comments:

Post a Comment