ARCHIVED: In Unix, how do I uuencode a binary file?

This content has been archived, and is no longer maintained by Indiana University. Resources linked from this page may no longer be available or reliable.

The uuencode command uses the syntax:

  uuencode original_filename final_filename > encoded_filename

Replace original_filename with the name of your binary file. Replace final_filename with the name that you want the file to have when it is eventually decoded (usually the same as original_filename). Replace encoded_filename with the name you want to give the uuencoded version of the binary as it will appear in your directory.

For example, to convert a binary file named into a uuencoded (text) file named myfile.uue, you would enter at the Unix prompt:

  uuencode > myfile.uue

The original binary file is unchanged, and the uuencoded file myfile.uue is now located in your current directory. The greater-than character (>) is used to redirect output; it takes the output of the uuencode command and directs it into the file myfile.uue (rather than onto your screen).

The purpose of the uuencode program is to translate a binary file that contains unprintable (non-text) characters into a format that is entirely readable. This prevents mail, news, and terminal programs from misinterpreting non-text characters as special instructions. A text file produced by uuencode may thus be mailed as an ordinary mail message and later uudecoded into its original binary form by the recipient. The uuencoded file is usually larger than the original binary file, because the unprintable characters in the binary file are expanded into multiple readable characters.

At Indiana University, for personal or departmental Linux or Unix systems support, see Get help for Linux or Unix at IU.

This is document acnp in the Knowledge Base.
Last modified on 2018-01-18 09:23:14.

Contact us

For help or to comment, email the UITS Support Center.