uuencode(1) CLIX uuencode(1)
NAME
uuencode, uudecode - Encodes/decodes binary file for mail transmission
SYNOPSIS
uuencode [source_file] dest_filename
uudecode [filename]
DESCRIPTION
The uuencode and uudecode commands are used to send a binary file to a
remote system via uucp (or other) mail. The commands can be used over
indirect mail links even if uusend is not available.
The uuencode command takes input from stdin or a specified source_file and
sends encoded output to stdout. The encoded output consists of
displayable ASCII characters. The header line of the encoded output
includes the string dest_filename, which is used by uudecode to provide a
filename for its decoded output. The specified dest_filename may be the
same as the filename for source_file, or it may be a different filename.
The uudecode command takes encoded output of a uuencode command, removes
any leading and trailing lines added by mailers, and recreates the
original input to uuencode as a binary file. The recreated file is given
the filename dest_filename, which was specified when the file was encoded.
These commands are intended for use in handling binary files over mail
links without user intervention; for example, automatically encoding files
sent to a user named decode on a remote system, and automatically decoding
files when decode receives them. On the uucp network, this can be done
using sendmail, or by making rmail a link to Mail rather than mail. An
alias for a decoding user must reside in a master file to automatically
run uuencode and uudecode.
The output of uuencode can be redirected to create an encoded file which
can then be decoded manually by uudecode. The encoded file has an
ordinary text form, so a text editor can be used to change the filename or
mode of the dest_filename specified on the header line of the encoded
file.
EXAMPLES
1. The following displays a binary file wombat.code using cat, and pipes
output through uuencode to produce encoded output on stdout. The
uuencode command specifies wombat.code as the dest_filename string to
be placed in the header line of the encoded file.
cat wombat.code | uuencode wombat.code
2/94 - Intergraph Corporation 1
uuencode(1) CLIX uuencode(1)
2. The following encodes a binary file foo, giving the encoded output the
same filename as the source file, and redirects the output to a
encoded file foo.uu. The subsequent uudecode command decodes the
encoded file foo.uu, recreating the binary file and naming it foo.
uuencode foo foo > foo.uu
uudecode foo.uu
3. The following encodes a binary file foo, giving the encoded file the
filename bar, and redirects the output to a encoded file bar.uu. The
subsequent uudecode command decodes the encoded file bar.uu,
recreating the binary contents of foo but naming the new file bar.
uuencode foo bar > bar.uu
uudecode bar.uu
NOTES
The uuencode command produces output that is 35 percent larger than its
input (3 bytes become 4 plus control information). This will result in
longer transmission time when the output is sent to a remote system over
mail links.
A user on a remote system using uudecode (often uucp) must have write
permission on the specified file.
EXIT VALUES
The uuencode command exits with one of the following values:
1 The input file was unreadable.
2 The uuencode command was run incorrectly.
0 All other cases.
The uudecode command exits with one of the following values, in addition
to the values listed for uuencode:
3 The input file had no begin line.
4 The uudecode command could not open the file.
5 The input file had no end line.
RELATED INFORMATION
Commands: uucp(1), uux(1), mail(1)
Files: uuencode(4)
2 Intergraph Corporation - 2/94