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