Name

uuencode [options] newfile infile — sharutils

Synopsis

/usr/bin stdin stdout - file -- opt --help --version

Before the days of email attachments and MIME, binary files took some work to transmit by email. You would first uuencode the files (pronounced “you-you-encode”) into an ASCII format that looks like this:

begin 644 myfile
M(R`N8F%S:%]P<F]F:6QE"B,@4G5N<R!F:7)S="!W:&5N(&QO9V=I;F<@:6X@
M=6YD97(@1TY/344*"G1R87`@)PH@('1E<W0@+6X@(B134TA?04=%3E1?4$E$
...
end

Upon receiving this data, the recipient would uudecode (“you-you-decode”) it to restore the original data.

To convert a file myfile into uuencoded format, creating myfile.uu:

$ uuencode newfile myfile > myfile.uu

The first argument, newfile, is the file to be created at decoding time. It will appear in the first line of uuencoded output:

begin 644 newfile
M(R`N8F%S:%]P<F]F:6QE"B,@4G5N<R!F:7)S="!W:&5N(&QO9V=I;F<@:6X@
...

To decode this uudecoded file myfile.uu, creating newfile:

$ uudecode myfile.uu

Get Linux Pocket Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.