
vi | 497
Linux
Commands
This is the Title of the Book, eMatter Edition
Copyright © 2006 O’Reilly & Associates, Inc. All rights reserved.
uudecode
uudecode [-o outfile] [file]
Read a uuencoded file and re-create the original file with the
permissions and name set in the file (see uuencode). The -o option
specifies an alternate output file.
uuencode
uuencode [-m] [file] name
Encode a binary file. The encoding uses only printable ASCII char-
acters and includes the permissions and name of the file. When file
is reconverted via uudecode, the output is saved as name. If the file
argument is omitted, uuencode can take standard input, so a single
argument is taken as the name to be given to the file when it is
decoded. With the -m option, base64 encoding is used.
Examples
It’s common to encode a file and save it with an identifying exten-
sion, such as .uue. This example encodes the binary file flower12.
jpg, names it rose.jpg, and saves it to a .uue file:
$ uuencode flower12.jpg rose.jpg > rose.uue
Encode flower12.jpg and mail it:
$ uuencode flower12.jpg flower12.jpg | mail el@oreilly.com
uuidgen
uuidgen [option]
Create a new Universal Unique Identifier (UUID) and print it to
standard output. The generated UUID consists of five hyphen-
separated groups of hex digits (e.g., 3cdfc61d-87d3-41b5-ba50-
32870b33dc67). The default is to generate a random-based UUID,
but this requires that a high-quality random-number