maux
Star on GitHub Buy me a coffee

Manual / uuencode

uuencode(1)

UUENCODE(1) General Commands Manual UUENCODE(1)

uuencode - encode a binary file into printable ASCII

uuencode [ -m ] [ file ] decode_pathname

Uuencode reads file (or standard input, if only decode_pathname is given) and writes a "begin" header line, the encoded body, and a trailer to standard output. Decode_pathname is written into the header verbatim; it is never opened or checked for existence, and need not match any real file.

The header line reads begin mode decode_pathname (or begin-base64, with -m), where mode is always the literal 644 : this machine has no permission bits to report.

Use the base64 alphabet (RFC 4648) instead of the historical uuencode alphabet. Lines carry 57 source bytes (76 characters); the final, possibly short, group is padded with =. The trailer is a line of four = characters.

Without -m, each line carries up to 45 source bytes, prefixed by a length character (32 plus the byte count, or a backquote for a zero-length line). Each 6-bit group encodes as 32 plus its value, except a zero group, which encodes as a backquote rather than a space -- the historical convention that survives mail transports which strip trailing spaces. The body ends with a zero-length line (a lone backquote) followed by end.

Uuencode writes a maux TEXT file: high-bit ASCII, CR line ends, the same convention every other program in this tree uses -- not the plain 7-bit ASCII a uuencode file traditionally is on the wire. tip (1) strips the high bit on the way out to the serial line (docs/SERIAL.md), so uuencode FILE NAME | tip reaches the far end as an ordinary 7-bit uuencode file without any extra step here.

/usr/man/UUENCODE this page

uudecode(1), tip(1)

Exit status is 0 on success; 1 if file could not be opened; 2 on a usage error (an unrecognised option, or other than one or two operands).

Group ownership and any other permission bits are never reported; the header's mode field is always 644.

September 14, 2026 maux