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

Annotation of src/usr.bin/shar/shar.1, Revision 1.12

1.12    ! jmc         1: .\"    $OpenBSD: shar.1,v 1.11 2008/06/03 19:51:02 jmc Exp $
1.1       deraadt     2: .\"    $NetBSD: shar.1,v 1.4 1995/08/18 14:55:40 pk Exp $
                      3: .\"
                      4: .\" Copyright (c) 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.8       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: .\"     @(#)shar.1     8.1 (Berkeley) 6/6/93
                     32: .\"
1.12    ! jmc        33: .Dd $Mdocdate: June 3 2008 $
1.1       deraadt    34: .Dt SHAR 1
1.4       aaron      35: .Os
1.1       deraadt    36: .Sh NAME
                     37: .Nm shar
                     38: .Nd create a shell archive of files
                     39: .Sh SYNOPSIS
1.10      sobrado    40: .Nm shar
                     41: .Ar
1.1       deraadt    42: .Sh DESCRIPTION
1.3       aaron      43: .Nm shar
1.1       deraadt    44: writes an
                     45: .Xr sh 1
                     46: shell script to the standard output which will recreate the file
                     47: hierarchy specified by the command line operands.
                     48: Directories will be recreated and must be specified before the
                     49: files they contain (the
                     50: .Xr find 1
                     51: utility does this correctly).
                     52: .Pp
1.3       aaron      53: .Nm shar
1.1       deraadt    54: is normally used for distributing files by
1.6       aaron      55: .Xr ftp 1
1.1       deraadt    56: or
1.6       aaron      57: .Xr mail 1 .
1.1       deraadt    58: .Sh EXAMPLES
                     59: To create a shell archive of the program
1.6       aaron      60: .Xr ls 1
1.1       deraadt    61: and mail it to Rick:
                     62: .Bd -literal -offset indent
1.7       mpech      63: $ cd ls
1.12    ! jmc        64: $ shar `find . -print` | mail -s "ls source" rick
1.1       deraadt    65: .Ed
                     66: .Pp
                     67: To recreate the program directory:
                     68: .Bd -literal -offset indent
1.7       mpech      69: $ mkdir ls
                     70: $ cd ls
1.1       deraadt    71: \&...
                     72: <delete header lines and examine mailed archive>
                     73: \&...
1.7       mpech      74: $ sh archive
1.1       deraadt    75: .Ed
1.5       aaron      76: .Sh SEE ALSO
                     77: .Xr compress 1 ,
                     78: .Xr mail 1 ,
                     79: .Xr tar 1 ,
                     80: .Xr uuencode 1
1.1       deraadt    81: .Sh HISTORY
                     82: The
                     83: .Nm
1.3       aaron      84: command appeared in
1.1       deraadt    85: .Bx 4.4 .
1.5       aaron      86: .Sh BUGS
                     87: .Nm shar
                     88: makes no provisions for special types of files or files containing
                     89: magic characters.
                     90: .Pp
                     91: It is easy to insert trojan horses into
                     92: .Nm shar
                     93: files.
                     94: It is strongly recommended that all shell archive files be examined
                     95: before running them through
1.6       aaron      96: .Xr sh 1 .
1.5       aaron      97: Archives produced using this implementation of
                     98: .Nm shar
                     99: may be easily examined with the command:
                    100: .Bd -literal -offset indent
1.7       mpech     101: $ egrep -v '^[X#]' shar.file
1.5       aaron     102: .Ed