xref: /minix3/usr.bin/shar/shar.1 (revision e91d931d7dcfb0796d32e06157c841f1ac5b3b71)
1*e91d931dSSky Liu.\"	$NetBSD: shar.1,v 1.12 2012/03/22 07:58:19 wiz Exp $
2*e91d931dSSky Liu.\"
3*e91d931dSSky Liu.\" Copyright (c) 1990, 1993
4*e91d931dSSky Liu.\"	The Regents of the University of California.  All rights reserved.
5*e91d931dSSky Liu.\"
6*e91d931dSSky Liu.\" Redistribution and use in source and binary forms, with or without
7*e91d931dSSky Liu.\" modification, are permitted provided that the following conditions
8*e91d931dSSky Liu.\" are met:
9*e91d931dSSky Liu.\" 1. Redistributions of source code must retain the above copyright
10*e91d931dSSky Liu.\"    notice, this list of conditions and the following disclaimer.
11*e91d931dSSky Liu.\" 2. Redistributions in binary form must reproduce the above copyright
12*e91d931dSSky Liu.\"    notice, this list of conditions and the following disclaimer in the
13*e91d931dSSky Liu.\"    documentation and/or other materials provided with the distribution.
14*e91d931dSSky Liu.\" 3. Neither the name of the University nor the names of its contributors
15*e91d931dSSky Liu.\"    may be used to endorse or promote products derived from this software
16*e91d931dSSky Liu.\"    without specific prior written permission.
17*e91d931dSSky Liu.\"
18*e91d931dSSky Liu.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
19*e91d931dSSky Liu.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20*e91d931dSSky Liu.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21*e91d931dSSky Liu.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
22*e91d931dSSky Liu.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23*e91d931dSSky Liu.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24*e91d931dSSky Liu.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25*e91d931dSSky Liu.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26*e91d931dSSky Liu.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27*e91d931dSSky Liu.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28*e91d931dSSky Liu.\" SUCH DAMAGE.
29*e91d931dSSky Liu.\"
30*e91d931dSSky Liu.\"     @(#)shar.1	8.1 (Berkeley) 6/6/93
31*e91d931dSSky Liu.\"
32*e91d931dSSky Liu.Dd June 6, 1993
33*e91d931dSSky Liu.Dt SHAR 1
34*e91d931dSSky Liu.Os
35*e91d931dSSky Liu.Sh NAME
36*e91d931dSSky Liu.Nm shar
37*e91d931dSSky Liu.Nd create a shell archive of files
38*e91d931dSSky Liu.Sh SYNOPSIS
39*e91d931dSSky Liu.Nm
40*e91d931dSSky Liu.Ar
41*e91d931dSSky Liu.Sh DESCRIPTION
42*e91d931dSSky Liu.Nm
43*e91d931dSSky Liuwrites an
44*e91d931dSSky Liu.Xr sh 1
45*e91d931dSSky Liushell script to the standard output which will recreate the file
46*e91d931dSSky Liuhierarchy specified by the command line operands.
47*e91d931dSSky LiuDirectories will be recreated and must be specified before the
48*e91d931dSSky Liufiles they contain (the
49*e91d931dSSky Liu.Xr find 1
50*e91d931dSSky Liuutility does this correctly).
51*e91d931dSSky Liu.Pp
52*e91d931dSSky Liu.Nm
53*e91d931dSSky Liuis normally used for distributing files by
54*e91d931dSSky Liu.Xr ftp 1
55*e91d931dSSky Liuor
56*e91d931dSSky Liu.Xr mail 1 .
57*e91d931dSSky Liu.Sh EXAMPLES
58*e91d931dSSky LiuTo create a shell archive of the program
59*e91d931dSSky Liu.Xr ls 1
60*e91d931dSSky Liuand mail it to Rick:
61*e91d931dSSky Liu.Bd -literal -offset indent
62*e91d931dSSky Liucd ls
63*e91d931dSSky Liushar `find . -print` \&|  mail -s "ls source" rick
64*e91d931dSSky Liu.Ed
65*e91d931dSSky Liu.Pp
66*e91d931dSSky LiuTo recreate the program directory:
67*e91d931dSSky Liu.Bd -literal -offset indent
68*e91d931dSSky Liumkdir ls
69*e91d931dSSky Liucd ls
70*e91d931dSSky Liu\&...
71*e91d931dSSky Liu\*[Lt]delete header lines and examine mailed archive\*[Gt]
72*e91d931dSSky Liu\&...
73*e91d931dSSky Liush archive
74*e91d931dSSky Liu.Ed
75*e91d931dSSky Liu.Sh SEE ALSO
76*e91d931dSSky Liu.Xr compress 1 ,
77*e91d931dSSky Liu.Xr mail 1 ,
78*e91d931dSSky Liu.Xr tar 1 ,
79*e91d931dSSky Liu.Xr uuencode 1
80*e91d931dSSky Liu.Sh HISTORY
81*e91d931dSSky LiuThe
82*e91d931dSSky Liu.Nm
83*e91d931dSSky Liucommand appeared in
84*e91d931dSSky Liu.Bx 4.4 .
85*e91d931dSSky Liu.Sh BUGS
86*e91d931dSSky Liu.Nm
87*e91d931dSSky Liumakes no provisions for special types of files or files containing
88*e91d931dSSky Liumagic characters.
89*e91d931dSSky Liu.Sh SECURITY CONSIDERATIONS
90*e91d931dSSky LiuIt is easy to insert trojan horses into
91*e91d931dSSky Liu.Nm
92*e91d931dSSky Liufiles.
93*e91d931dSSky LiuIt is strongly recommended that all shell archive files be examined
94*e91d931dSSky Liubefore running them through
95*e91d931dSSky Liu.Xr sh 1 .
96*e91d931dSSky LiuArchives produced using this implementation of
97*e91d931dSSky Liu.Nm
98*e91d931dSSky Liumay be easily examined with the command:
99*e91d931dSSky Liu.Bd -literal -offset indent
100*e91d931dSSky Liuegrep -v '^[X#]' shar.file
101*e91d931dSSky Liu.Ed
102