1.\" $NetBSD: uuencode.1,v 1.14 2003/08/07 11:16:58 agc Exp $ 2.\" 3.\" Copyright (c) 1980, 1990, 1993 4.\" The Regents of the University of California. All rights reserved. 5.\" 6.\" Redistribution and use in source and binary forms, with or without 7.\" modification, are permitted provided that the following conditions 8.\" are met: 9.\" 1. Redistributions of source code must retain the above copyright 10.\" notice, this list of conditions and the following disclaimer. 11.\" 2. Redistributions in binary form must reproduce the above copyright 12.\" notice, this list of conditions and the following disclaimer in the 13.\" documentation and/or other materials provided with the distribution. 14.\" 3. Neither the name of the University nor the names of its contributors 15.\" may be used to endorse or promote products derived from this software 16.\" without specific prior written permission. 17.\" 18.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 19.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 22.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 24.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 25.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 26.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 27.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 28.\" SUCH DAMAGE. 29.\" 30.\" @(#)uuencode.1 8.1 (Berkeley) 6/6/93 31.\" 32.Dd March 19, 1999 33.Dt UUENCODE 1 34.Os 35.Sh NAME 36.Nm uuencode , 37.Nm uudecode 38.Nd encode/decode a binary file 39.Sh SYNOPSIS 40.Nm 41.Op Ar file 42.Ar name 43.Nm uudecode 44.Op Fl p 45.Op Ar file ... 46.Sh DESCRIPTION 47.Nm 48and 49.Nm uudecode 50are used to transmit binary files over transmission mediums 51that do not support other than simple 52.Tn ASCII 53data. 54.Pp 55.Nm 56reads 57.Ar file 58(or by default the standard input) and writes an encoded version 59to the standard output. 60The encoding uses only printing 61.Tn ASCII 62characters and includes the 63mode of the file and the operand 64.Ar name 65for use by 66.Nm uudecode . 67.Pp 68.Nm uudecode 69transforms 70.Em uuencoded 71files (or by default, the standard input) into the original form. 72The resulting file is named 73.Ar name 74and will have the mode of the original file except that setuid 75and execute bits are not retained; if the 76.Fl p 77option is specified, the data will be written to the standard output. 78.Nm uudecode 79ignores any leading and trailing lines. 80.Sh EXIT STATUS 81The 82.Nm uudecode 83and 84.Nm 85utilities exits 0 on success, and \*[Gt]0 if an error occurs. 86.Sh EXAMPLES 87The following example packages up a source tree, compresses it, 88uuencodes it and mails it to a user on another system. 89When 90.Nm uudecode 91is run on the target system, the file ``src_tree.tar.Z'' will be 92created which may then be uncompressed and extracted into the original 93tree. 94.Pp 95.Bd -literal -offset indent -compact 96tar cf \- src_tree \&| compress \&| 97uuencode src_tree.tar.Z \&| mail sys1!sys2!user 98.Ed 99.Sh SEE ALSO 100.Xr compress 1 , 101.Xr mail 1 , 102.Xr uucp 1 , 103.Xr uuencode 5 104.Sh STANDARDS 105The 106.Nm uudecode 107and 108.Nm 109utilities conform to 110.St -p1003.2-92 . 111.Sh HISTORY 112The 113.Nm uudecode 114and 115.Nm 116utilities appeared in 117.Bx 4.0 . 118.Sh BUGS 119The encoded form of the file is expanded by 35% (3 bytes become 4 plus 120control information). 121