converted man page
[unix-history] / usr / src / usr.bin / shar / shar.1
CommitLineData
a8c9a09d
KB
1.\" Copyright (c) 1990 The Regents of the University of California.
2.\" All rights reserved.
3.\"
4.\" %sccs.include.redist.man%
5.\"
daacd5f0 6.\" @(#)shar.1 5.2 (Berkeley) %G%
a8c9a09d 7.\"
daacd5f0 8.TH SHAR 1 "%Q"
a8c9a09d
KB
9.UC 7
10.SH NAME
11shar \- create a shell archive of files
12.SH SYNOPSIS
13.nf
14.ft B
15shar file ...
16.ft R
17.fi
18.SH DESCRIPTION
19.I Shar
20writes an
21.IR sh (1)
22shell script to the standard output which will recreate the file
23hierarchy specified by the command line operands.
24Directories will be recreated and must be specified before the
25files they contain.
26.PP
27.I Shar
28is normally used for distributing small numbers of files by
29.IR ftp (1)
30or
31.IR mail (1).
32.SH SEE ALSO
33compress(1), mail(1), uuencode(1), tar(1)
34.SH BUGS
35.I Shar
36makes no provisions for special types of files or files containing
37magic characters.
38.PP
39It is easy to insert trojan horses into
40.I shar
41files.
42It is strongly recommended that all shell archive files be examined
43before running them through
44.IR sh (1).
45Archives produced using this implementation of
46.I shar
47may be easily examined with the command:
48.sp
49.RS
50grep -v '^X' program.shar
51.RE
52.SH EXAMPLES
53To create a shell archive of the program
54.IR ls (1)
55and mail it to Rick:
56.sp
57.RS
58cd ls
59.br
60shar `find . -print` | mail -s "ls source" rick
61.RE
62.sp
63To recreate the program directory:
64.sp
65.RS
66mkdir ls
67.br
68cd ls
69.br
70<delete header lines and examine mailed archive>
71.br
72sh archive
73.RE