Examples of encoding files

To encode a single binary file:

   uuencode window.xwd window.xwd >window.uu

This encodes the binary file window.xwd as the file window.uu. The file label is the same as name of the source file. The output from the command has to be explicitly redirected to the file window.uu.


To decode a uuencoded file:

   uudecode window.uu

This decodes the file window.uu and recreates the file window.xwd. The encoded file is not removed.


To encode several files:

   tar cf - *.xwd | compress | uuencode pics.tar.Z > pics.uu

First, this command creates a tarfile of all the files in the current directory with the filename extension .xwd. This tarfile is compressed and then encoded as the file pictures.uu.

When the user decodes the .uu file the compressed tarfile pictures.tar.Z will be created. This can then be unpacked to extract the .xwd files.


[Home] [Search] [Index] This site maintained by webmaster@deslab.mit.edu