[BACK]Return to uuencode.1 CVS log [TXT][DIR] Up to [local] / src / usr.bin / uuencode

Annotation of src/usr.bin/uuencode/uuencode.1, Revision 1.14

1.14    ! millert     1: .\"    $OpenBSD: uuencode.1,v 1.13 2003/06/03 02:56:21 millert Exp $
        !             2: .\"    $FreeBSD: uuencode.1,v 1.26 2003/03/18 14:24:47 fanf Exp $
1.1       deraadt     3: .\"
                      4: .\" Copyright (c) 1980, 1990, 1993
                      5: .\"    The Regents of the University of California.  All rights reserved.
                      6: .\"
                      7: .\" Redistribution and use in source and binary forms, with or without
                      8: .\" modification, are permitted provided that the following conditions
                      9: .\" are met:
                     10: .\" 1. Redistributions of source code must retain the above copyright
                     11: .\"    notice, this list of conditions and the following disclaimer.
                     12: .\" 2. Redistributions in binary form must reproduce the above copyright
                     13: .\"    notice, this list of conditions and the following disclaimer in the
                     14: .\"    documentation and/or other materials provided with the distribution.
1.13      millert    15: .\" 3. Neither the name of the University nor the names of its contributors
1.1       deraadt    16: .\"    may be used to endorse or promote products derived from this software
                     17: .\"    without specific prior written permission.
                     18: .\"
                     19: .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
                     20: .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
                     21: .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
                     22: .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
                     23: .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
                     24: .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
                     25: .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
                     26: .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
                     27: .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
                     28: .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
                     29: .\" SUCH DAMAGE.
                     30: .\"
                     31: .\"     @(#)uuencode.1 8.1 (Berkeley) 6/6/93
1.14    ! millert    32: .\" $FreeBSD$
1.1       deraadt    33: .\"
1.14    ! millert    34: .Dd January 27, 2002
1.1       deraadt    35: .Dt UUENCODE 1
1.6       aaron      36: .Os
1.1       deraadt    37: .Sh NAME
                     38: .Nm uuencode ,
1.14    ! millert    39: .Nm uudecode ,
        !            40: .Nm b64encode ,
        !            41: .Nm b64decode
1.1       deraadt    42: .Nd encode/decode a binary file
                     43: .Sh SYNOPSIS
                     44: .Nm uuencode
1.14    ! millert    45: .Op Fl m
        !            46: .Op Fl o Ar output_file
1.1       deraadt    47: .Op Ar file
                     48: .Ar name
                     49: .Nm uudecode
1.14    ! millert    50: .Op Fl cimprs
        !            51: .Op Ar
        !            52: .Nm uudecode
        !            53: .Op Fl i
        !            54: .Fl o Ar output_file
        !            55: .Nm b64encode
        !            56: .Op Fl o Ar output_file
        !            57: .Op Ar file
        !            58: .Ar name
        !            59: .Nm b64decode
        !            60: .Op Fl ciprs
        !            61: .Op Ar
        !            62: .Nm b64decode
        !            63: .Op Fl i
        !            64: .Fl o Ar output_file
        !            65: .Op Ar file
1.1       deraadt    66: .Sh DESCRIPTION
1.14    ! millert    67: The
1.5       aaron      68: .Nm uuencode
1.1       deraadt    69: and
                     70: .Nm uudecode
1.14    ! millert    71: utilities are used to transmit binary files over transmission mediums
1.12      hugh       72: that do not support formats other than printable
1.1       deraadt    73: .Tn ASCII
                     74: data.
1.14    ! millert    75: .Nm b64encode
        !            76: and
        !            77: .Nm b64decode
        !            78: are equivalent to running
        !            79: .Nm uuencode
        !            80: and
        !            81: .Nm uudecode
        !            82: respectively with the
        !            83: .Fl m
        !            84: flag specified.
1.1       deraadt    85: .Pp
1.5       aaron      86: .Nm uuencode
1.1       deraadt    87: reads
                     88: .Ar file
1.5       aaron      89: (or by default, the standard input) and writes an encoded version
1.14    ! millert    90: to the standard output, or to
        !            91: .Ar output_file
        !            92: if it has been specified.
1.1       deraadt    93: The encoding uses only printing
                     94: .Tn ASCII
                     95: characters and includes the
                     96: mode of the file and the operand
                     97: .Ar name
                     98: for use by
                     99: .Nm uudecode .
                    100: .Pp
1.5       aaron     101: .Nm uudecode
1.1       deraadt   102: transforms
1.5       aaron     103: .Dq uuencoded
1.1       deraadt   104: files (or by default, the standard input) into the original form.
1.14    ! millert   105: The resulting file is named either
1.1       deraadt   106: .Ar name
1.14    ! millert   107: or (depending on options passed to
        !           108: .Nm uudecode )
        !           109: .Ar output_file
1.5       aaron     110: and will have the mode of the original file except that set-user-ID
1.7       aaron     111: and execute bits are not retained.
1.5       aaron     112: .Nm uudecode
1.1       deraadt   113: ignores any leading and trailing lines.
1.14    ! millert   114: .Pp
        !           115: The options for
        !           116: .Nm uuencode
        !           117: are as follows:
        !           118: .Bl -tag -width ident
        !           119: .It Fl m
        !           120: Use the Base64 method of encoding, rather than the traditional
        !           121: .Nm
        !           122: algorithm.
        !           123: .It Fl o Ar output_file
        !           124: Output to
        !           125: .Ar output_file
        !           126: instead of standard output.
        !           127: .El
        !           128: .Pp
        !           129: The options for
        !           130: .Nm uudecode
        !           131: are as follows:
        !           132: .Bl -tag -width ident
        !           133: .It Fl c
        !           134: Decode more than one uuencoded file from
        !           135: .Ar file
        !           136: if possible.
        !           137: .It Fl i
        !           138: Do not overwrite files.
        !           139: .It Fl m
        !           140: When used with the
        !           141: .Fl r
        !           142: flag, decode Base64 input instead of traditional
        !           143: .Nm
        !           144: input.
        !           145: Without
        !           146: .Fl r
        !           147: it has no effect.
        !           148: .It Fl o Ar output_file
        !           149: Output to
        !           150: .Ar output_file
        !           151: instead of any pathname contained in the input data.
        !           152: .It Fl p
        !           153: Decode
        !           154: .Ar file
        !           155: and write output to standard output.
        !           156: .It Fl r
        !           157: Decode raw (or broken) input which is missing the initial and
        !           158: possibly the final framing lines.
        !           159: The input is assumed to be in the traditional
        !           160: .Nm
        !           161: encoding, but if the
        !           162: .Fl m
        !           163: flag is used, or if the utility is invoked as
        !           164: .Nm b64decode ,
        !           165: then the input is assumed to be in Base64 format.
        !           166: .It Fl s
        !           167: Do not strip output pathname to base filename.
        !           168: By default
        !           169: .Nm uudecode
        !           170: deletes any prefix ending with the last slash '/' for security
        !           171: reasons.
        !           172: .El
1.1       deraadt   173: .Sh EXAMPLES
                    174: The following example packages up a source tree, compresses it,
                    175: uuencodes it and mails it to a user on another system.
                    176: When
                    177: .Nm uudecode
1.7       aaron     178: is run on the target system, the file
                    179: .Pa src_tree.tar.Z
                    180: will be created which may then be uncompressed and extracted
                    181: into the original tree.
1.14    ! millert   182: .Bd -literal -offset indent
        !           183: $ tar cf - src_tree | compress | \e
        !           184: uuencode src_tree.tar.Z | mail user@example.com
        !           185: .Ed
1.1       deraadt   186: .Pp
1.14    ! millert   187: The following example unpacks all uuencoded
        !           188: files from your mailbox into your current working directory.
        !           189: .Bd -literal -offset indent
        !           190: $ uudecode -c \*(Lt $MAIL
1.1       deraadt   191: .Ed
1.7       aaron     192: .Pp
1.14    ! millert   193: The following example extracts a compressed tar
        !           194: archive from your mailbox
        !           195: .Bd -literal -offset indent
        !           196: $ uudecode -o /dev/stdout \*(Gt $MAIL | zcat | tar xfv -
        !           197: .Ed
1.1       deraadt   198: .Sh SEE ALSO
1.14    ! millert   199: .Xr basename 1 ,
1.1       deraadt   200: .Xr compress 1 ,
                    201: .Xr mail 1 ,
1.14    ! millert   202: .Xr uucp 1 ,
1.2       deraadt   203: .Xr uuencode 5
1.1       deraadt   204: .Sh STANDARDS
1.6       aaron     205: The
1.1       deraadt   206: .Nm uudecode
                    207: and
                    208: .Nm uuencode
1.6       aaron     209: utilities conform to
1.1       deraadt   210: .St -p1003.2-92 .
                    211: .Sh HISTORY
                    212: The
                    213: .Nm uudecode
                    214: and
1.14    ! millert   215: .Nm
1.1       deraadt   216: utilities appeared in
                    217: .Bx 4.0 .
                    218: .Sh BUGS
1.14    ! millert   219: Files encoded using the traditional algorithm are expanded by 35%
        !           220: (3 bytes become 4 plus control information).