4.3BSD-Reno/src/usr.bin/shar/shar.1

Compare this file to the similar file:
Show the results in this format:

.\" Copyright (c) 1990 The Regents of the University of California.
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms are permitted provided
.\" that: (1) source distributions retain this entire copyright notice and
.\" comment, and (2) distributions including binaries display the following
.\" acknowledgement:  ``This product includes software developed by the
.\" University of California, Berkeley and its contributors'' in the
.\" documentation or other materials provided with the distribution and in
.\" all advertising materials mentioning features or use of this software.
.\" Neither the name of the University nor the names of its contributors may
.\" be used to endorse or promote products derived from this software without
.\" specific prior written permission.
.\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
.\" WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
.\"
.\"     @(#)shar.1	5.2 (Berkeley) 6/24/90
.\"
.TH SHAR 1 "%Q"
.UC 7
.SH NAME
shar \- create a shell archive of files
.SH SYNOPSIS
.nf
.ft B
shar file ...
.ft R
.fi
.SH DESCRIPTION
.I Shar
writes an
.IR sh (1)
shell script to the standard output which will recreate the file
hierarchy specified by the command line operands.
Directories will be recreated and must be specified before the
files they contain.
.PP
.I Shar
is normally used for distributing small numbers of files by
.IR ftp (1)
or
.IR mail (1).
.SH SEE ALSO
compress(1), mail(1), uuencode(1), tar(1)
.SH BUGS
.I Shar
makes no provisions for special types of files or files containing
magic characters.
.PP
It is easy to insert trojan horses into
.I shar
files.
It is strongly recommended that all shell archive files be examined
before running them through
.IR sh (1).
Archives produced using this implementation of
.I shar
may be easily examined with the command:
.sp
.RS
grep -v '^X' program.shar
.RE
.SH EXAMPLES
To create a shell archive of the program
.IR ls (1)
and mail it to Rick:
.sp
.RS
cd ls
.br
shar `find . -print` | mail -s "ls source" rick
.RE
.sp
To recreate the program directory:
.sp
.RS
mkdir ls
.br
cd ls
.br
<delete header lines and examine mailed archive>
.br
sh archive
.RE