Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

uuencode - encode a binary file

&pagelevel(4)&pagelevel

uuencode and uudecode are used in combination to send a text or binary file via mailx. You can send the file either directly or via a mailx chain linking a series of directly linked systems.

uuencode takes the named source file or the data from standard input and produces an encoded version of it on the standard output. Only printing ASCII characters are used for encoding, which among other things enables the transfer of 8-bit data over systems that are not 8-bit transparent. The encoding includes the file mode (permissions) and destination file name for recreating the file on the remote system.


Syntax


uuencode[ soure-file] destination-file


source-file

File to be encoded.

source-file not specified:
uuencode reads from standard input.

destination-file

Name of the destination file. Here you specify a path name which refers to the remote system.

Hint

uuencode and uudecode should be used as follows:

You call uuencode:

uuencode [source-file] destination-file | mailx system1!system2! ..!user

The encoded file is sent to the specified user on the remote system, who can then decode it with uudecode. The user on the remote system must have write permission for the file.

The encoded file produced by uuencode is a normal text file and can be edited with any text editor to change the file mode or the name of the destination file.

Encoding the source file expands it by 35% (3 bytes become 4 plus control information) and thus increases the time required to transmit it.

Locale

The following environment variables affect the execution of uuencode:

LANG

Provide a default value for the internationalization variables that are unset or null. If LANG is unset of null, the corresponding value from the implementation-specific default locale will be used. If any of the internationalization variables contains an invalid setting, the utility will behave as if none of the variables had been defined.

LC_ALL

If set to a non-empty string value, override the values of all the other internationalization variables.

LC_CTYPE

Determine the locale for the interpretation of sequences of bytes of text data as characters (for example, single- as opposed to multi-byte characters in arguments and input files).

LC_MESSAGES

Determine the locale that should be used to affect the format and contents of diagnostic messages written to standard error.

NLSPATH

Determine the location of message catalogs for the processing of LC_MESSAGES.

Example

A file called letter is to be sent in encoded form to user bill working on system roland. Once decoded the file is to be called scrpt:

$ uuencode letter scrpt | mailx roland!bill

See also

mailx, uudecode