Using uuencodeuudecode


Using uuencode/uudecode

To send your files to another person either through a tool such as FTP (stands for File Transfer Protocol and efficiently transfers files from a source to a destination) or through email, you may need to adjust things. For instance, you may need to send an email to a Macintosh user that uses Binhex. This is just another encoding scheme. Because of this, you may have to change the specification of the data you send in your email attachment. This is not common for users who are accustomed to using Windows, although email within Windows also uses uuencode. Long story short, it is imperative as a Unix user that you know how to adjust this because you may have to specify it with Unix.

Uuen-what? Uuencode stands for a set of algorithms for converting files into a series of 7-bit ASCII characters that can be transmitted over the Internet. Originally, uuencode stood for Unix-to-Unix encode, but it has since become a universal protocol used to transfer files between different platforms such as Unix, Windows, and Macintosh. Uuencoding is especially popular for sending email attachments. Nearly all email applications support uuencoding for sending attachments and uudecoding for receiving attachments.


The uuencode program accepts any file as input, and it produces an encoding of the file that can be included in an email message. To a person, the contents of this file look like random characters; on the receiving end, however, the user can use the uudecode command to extract the original file. Let's look at how that would work:

To use the uuencode command, you need to follow these steps:

1.

Select a file you want to email.

2.

Issue the uuencode command as uuencode <filename> <callmethis> > <filename>.uue. (You need to type the > before the <filename>.uue argument.)

Your computer will then produce a file named <filename>.uue, which contains the uuencoded version of the file. For example, if you have a file named test and you want to uuencode it, you can type the following:

 > uuencode testsend > testsent test.uue 

Your computer produces a file named test.uue, which when decoded will be named testsent and contains the contents of your testsend file. Now you can copy and paste, or do whatever you need to do to insert the file you just created into an email message and send it wherever you want.

Of course, if you receive a uuencoded file, you need to know how to decode the file. Decoding a uuencoded file is also extremely simple; issue the uudecode command as uudecode <filename.uue>. Your machine will produce a file in the current directory identical to the one originally uuencoded.



    SAMS Teach Yourself Unix in 10 Minutes
    Sams Teach Yourself Unix in 10 Minutes (2nd Edition)
    ISBN: 0672327643
    EAN: 2147483647
    Year: 2005
    Pages: 170

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net