fix .Os and history
[unix-history] / usr / src / usr.bin / uuencode / uuencode.1
CommitLineData
daacd5f0 1.\" Copyright (c) 1980, 1990 The Regents of the University of California.
33075542 2.\" All rights reserved.
e0107ca5 3.\"
daacd5f0 4.\" %sccs.include.redist.man%
33075542 5.\"
36cf35cb 6.\" @(#)uuencode.1 6.9 (Berkeley) %G%
e0107ca5 7.\"
36cf35cb
CL
8.Dd
9.Dt UUENCODE 1
10.Os BSD 4
11.Sh NAME
12.Nm uuencode ,
13.Nm uudecode
14.Nd encode/decode a binary file
15.Sh SYNOPSIS
16.Nm uuencode
17.Op Ar file
18.Ar name
19.Nm uudecode
20.Op Ar file ...
21.Sh DESCRIPTION
22.Nm Uuencode
e0107ca5 23and
36cf35cb 24.Nm uudecode
7ccf7324 25are used to transmit binary files over transmission mediums
36cf35cb
CL
26that do not support other than simple
27.Tn ASCII
28data.
29.Pp
30.Nm Uuencode
7ccf7324 31reads
36cf35cb 32.Ar file
7ccf7324
KB
33(or by default the standard input) and writes an encoded version
34to the standard output.
36cf35cb
CL
35The encoding uses only printing
36.Tn ASCII
37characters and includes the
7ccf7324 38mode of the file and the operand
36cf35cb 39.Ar name
7ccf7324 40for use by
36cf35cb
CL
41.Nm uudecode .
42.Pp
43.Nm Uudecode
7ccf7324 44transforms
36cf35cb 45.Em uuencoded
7ccf7324
KB
46files (or by default, the standard input) into the original form.
47The resulting file is named
36cf35cb 48.Ar name
2da676fd
KB
49and will have the mode of the original file except that setuid
50and execute bits are not retained.
36cf35cb 51.Nm Uudecode
7ccf7324 52ignores any leading and trailing lines.
36cf35cb 53.Sh EXAMPLES
7ccf7324
KB
54The following example packages up a source tree, compresses it,
55uuencodes it and mails it to a user on another system.
56When
36cf35cb 57.Nm uudecode
7ccf7324
KB
58is run on the target system, the file ``src_tree.tar.Z'' will be
59created which may then be uncompressed and extracted into the original
60tree.
36cf35cb
CL
61.Pp
62.Bd -literal -offset indent -compact
63tar cf \- src_tree \&| compress \&|
64uuencode src_tree.tar.Z \&| mail sys1!sys2!user
65.Ed
66.Sh SEE ALSO
67.Xr compress 1 ,
68.Xr mail 1 ,
69.Xr uucp 1 ,
70.Xr uuencode 5 ,
71.Xr format 5
72.Sh BUGS
7ccf7324
KB
73The encoded form of the file is expanded by 35% (3 bytes become 4 plus
74control information).
36cf35cb
CL
75.Sh HISTORY
76The
77.Nm
78command appeared in
79.Bx 4.0 .