HPlogo HP-UX Reference Volume 1 of 5 > u

uuencode(1)

» 

Technical documentation

Complete book in PDF

 » Table of Contents

 » Index

NAME

uuencode, uudecode — encode/decode a binary file for transmission by mailer

SYNOPSIS

uuencode [source] remotedest

uudecode [file]

DESCRIPTION

uuencode and uudecode can be used to send a binary file to another machine by means of such services as elm(1), mailx(1), or uucp(1) (see elm(1), mailx(1), and uucp(1)).

uuencode takes the named source file (default standard input) and produces an encoded version on the standard output. The encoding uses only printing ASCII characters, includes the original mode of the input file, and preserves the value of the remotedest argument which is the intended name for the file when it is restored later on the remote system.

uudecode reads an encoded file, ignores any leading and trailing lines added by mailers, and recreates the original file with the specified mode and name.

The encoded file is an ordinary ASCII text file and can be edited with any text editor to change the mode or remote name.

EXAMPLES

To encode and send a compiled program foo to user friend:

uuencode foo foo | mailx -s 'new program' friend

After receiving the mail message, user friend can decode the program by first saving the message in a file foo.mail and executing the command:

uudecode foo.mail

WARNINGS

The file is expanded by 35% (three bytes become four plus control information) causing it to take longer to transmit.

The user on the remote system who is invoking uudecode (often uucp) must have write permission for the specified file.

If an encoded file has the same name as the destination name specified in it, uudecode starts overwriting the encoded file before decoding is completed.

STANDARDS CONFORMANCE

uuencode,uudecode: XPG4, POSIX.2

© Hewlett-Packard Development Company, L.P.