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 myfile.zip into a uuencoded (text) file named myfile.uue, you would enter at the Unix prompt:

  uuencode myfile.zip myfile.zip > myfile.uue

The original binary file myfile.zip 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 At IU, how do I get support for Linux or Unix?

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

  • Fill out this form to submit your issue to the UITS Support Center.
  • Please note that you must be affiliated with Indiana University to receive support.
  • All fields are required.

Please provide your IU email address. If you currently have a problem receiving email at your IU account, enter an alternate email address.

  • Fill out this form to submit your comment to the IU Knowledge Base.
  • If you are affiliated with Indiana University and need help with a computing problem, please use the I need help with a computing problem section above, or contact your campus Support Center.

Please provide your IU email address. If you currently have a problem receiving email at your IU account, enter an alternate email address.