SHAR
Section: Misc. Reference Manual Pages (SCO)
Index
Return to Main Contents
NAME
shar - create file storage archive for extraction by /bin/sh
SYNOPSIS
shar
[-abcsvz] [-d delim] [-p prefix] [-m M -n N] files
DESCRIPTION
shar
prints its input files with special command lines around them
to be used by the shell,
/bin/sh ,
to extract them later.
The output can be filtered through the shell to
recreate copies of the original files.
shar
allows directories to be named, and
shar
prints the necessary commands
(mkdir & cd)
to create new directories and fill them.
shar
will emit commands to make executable plain files executable.
shar
will not allow existing files to be over-written, unless the "-s"
option is given.
OPTIONS
[ a ]
All the options.
The options:
-v -c -b -z -p X
are implied.
[ s ]
Silent running.
All checking and extra output is inhibited.
[ v ]
Print verbose feedback messages about what
shar
is doing to be printed during extraction.
Sizes of plain files are echoed to allow a simple validity check.
[ c ]
Check file size on extraction by counting characters.
An error message is reported to the person doing the
extraction if the sizes don't match.
One reason why the sizes may not match is that
shar
will append a newline to complete incomplete last lines;
shar
prints a message that mentions added newlines.
Another reason why the sizes may not match is that some
network mail programs remove non-whitespace control characters.
shar
prints a message that mentions control characters to the extractor.
[ b ]
Extract files into basenames so that files with absolute path names
are put into the current directory.
This option has strange effects when directories are archived.
[ z ]
Use of this option will create files upon extraction with the permissions
of the original archived files.
[ d delim ]
Use the argument to this option as the ``end of file'' delimiter instead
of the default.
The only reason to change it is if you suspect an file
contains the default delimiter:
!Funky!Stuff!.
[ m ]
This option must be accompanied by the below "-n N" option as well. Use the
integer argument M for creating multiple archives, where M <= N. Read it as
creating ``archive M of N''.
[ n ]
This option must be given with the above "-m M". The integer argument N is the
total number of archive files you wish to create.
[ p ]
Use the argument to this option as the prefix to each line of the archived
files.
This is to make sure that special characters at the start of lines are not
eaten up by programs like mailers.
If this option is used, the files will be extracted with the stream editor
sed
rather than
cat.
SEE ALSO
tar, cpio, sh
AUTHOR
Phil Cordier
(based on a shell version by James Gosling,
with additions motivated by
Gary Perlman,
Derek Zahn,
Michael Thompson,
H. Morrow Long,
Fred Avolio,
Gran Uddeborg,
Bill Davidson,
Scott Simpson
&
Chuck Wegrzyn)
LIMITATIONS
shar
does not know anything about
links between files.
Index
- NAME
-
- SYNOPSIS
-
- DESCRIPTION
-
- OPTIONS
-
- SEE ALSO
-
- AUTHOR
-
- LIMITATIONS
-
This document was created by
man2html,
using the manual pages.
Time: 23:28:37 GMT, January 29, 2023