uuencode Command

Purpose

Encodes a binary file for transmission using electronic mail.

Syntax

uuencode [ -m ] [ SourceFile ] OutputFile

Description

The uuencode command converts a binary file to ASCII data. This is useful before using BNU (or uucp) mail to send the file to a remote system. The uudecode command converts ASCII data created by the uuencode command back into its original binary form.

The uuencode command takes the named SourceFile (default standard input) and produces an encoded version on the standard output. The encoding uses only printable ASCII characters, and includes the mode of the file and the OutputFile filename used for recreation of the binary image on the remote system.

Use the uudecode command to decode the file.

Flags

Item Description
-m Encode the output using the MIME Base64 algorithm. If -m is not specified, the old uuencode algorithm will be used.

Parameters

Item Description
OutputFile Specifies the name of the decoded file. You can direct the output of the uuencode command to standard output by specifying /dev/stdout as the OutputFile.
SourceFile Specifies the name of the binary file to convert. Default is standard input.

Examples

  1. To encode the file unix on the local system and mail it to the user jsmith on another system called mysys, enter:
    uuencode unix unix | mail jsmith@mysys
  2. To encode the file /usr/lib/boot/unix on your local system with the name pigmy.goat in the file /tmp/con , enter:
    uuencode /usr/lib/boot/unix pigmy.goat > /tmp/con

Files

Item Description
/usr/bin/uuencode Contains the uuencode command.