version 1, including all changes.
.
Rev |
Author |
# |
Line |
1 |
perry |
1 |
SHAR |
|
|
2 |
!!!SHAR |
|
|
3 |
NAME |
|
|
4 |
SYNOPSIS |
|
|
5 |
DESCRIPTION |
|
|
6 |
OPTIONS |
|
|
7 |
EXAMPLES |
|
|
8 |
WARNINGS |
|
|
9 |
SEE ALSO |
|
|
10 |
DIAGNOSTICS |
|
|
11 |
AUTHORS |
|
|
12 |
---- |
|
|
13 |
!!NAME |
|
|
14 |
|
|
|
15 |
|
|
|
16 |
shar - create shell archives |
|
|
17 |
!!SYNOPSIS |
|
|
18 |
|
|
|
19 |
|
|
|
20 |
shar [[ options ] file ... |
|
|
21 |
shar -S [[ options ] |
|
|
22 |
!!DESCRIPTION |
|
|
23 |
|
|
|
24 |
|
|
|
25 |
Shar creates |
|
|
26 |
-o'' option is given. A wide range of features provide |
|
|
27 |
extensive flexibility in manufacturing shars and in |
|
|
28 |
specifying shar |
|
|
29 |
'' |
|
|
30 |
!!OPTIONS |
|
|
31 |
|
|
|
32 |
|
|
|
33 |
Options have a one letter version starting with - or a long |
|
|
34 |
version starting with --. The exception is ''--help'', |
|
|
35 |
''--version'', ''--no-i18n'' and |
|
|
36 |
''--print-text-domain-dir'' which does not have short |
|
|
37 |
versions. Mandatory arguments to long options are mandatory |
|
|
38 |
for short options too. Options can be given in any order. |
|
|
39 |
Some options depend on each other: |
|
|
40 |
|
|
|
41 |
|
|
|
42 |
The ''-o'' option is required if the ''-l'' or ''-L'' option is used. |
|
|
43 |
The ''-n'' option is required if the ''-a'' option is used. |
|
|
44 |
See ''-V'' below. |
|
|
45 |
|
|
|
46 |
|
|
|
47 |
__Giving feedback:__ |
|
|
48 |
|
|
|
49 |
|
|
|
50 |
''--help'' |
|
|
51 |
|
|
|
52 |
|
|
|
53 |
Print a help summary on standard output, then immediately |
|
|
54 |
exits. |
|
|
55 |
|
|
|
56 |
|
|
|
57 |
''--version'' |
|
|
58 |
|
|
|
59 |
|
|
|
60 |
Print the version number of the program on standard output, |
|
|
61 |
then immediately exits. |
|
|
62 |
|
|
|
63 |
|
|
|
64 |
''-q --quiet --silent'' |
|
|
65 |
|
|
|
66 |
|
|
|
67 |
Do not output verbose messages locally when producing the |
|
|
68 |
archive. |
|
|
69 |
|
|
|
70 |
|
|
|
71 |
__Selecting files:__ |
|
|
72 |
|
|
|
73 |
|
|
|
74 |
''-p --intermix-type'' |
|
|
75 |
|
|
|
76 |
|
|
|
77 |
Allow positional parameter options. The options ''-B'', |
|
|
78 |
''-T'', ''-z'' and ''-Z'' may be embedded, and |
|
|
79 |
files to the right of the option will be processed in the |
|
|
80 |
specified mode. |
|
|
81 |
|
|
|
82 |
|
|
|
83 |
''-S --stdin-file-list'' |
|
|
84 |
|
|
|
85 |
|
|
|
86 |
Read list of files to be packed from the standard input |
|
|
87 |
rather than from the command line. Input must be in a form |
|
|
88 |
similar to that generated by the find command, one filename |
|
|
89 |
per line. This switch is especially useful when the command |
|
|
90 |
line will not hold the list of files to be packed. For |
|
|
91 |
example: |
|
|
92 |
|
|
|
93 |
|
|
|
94 |
find . -type f -print | sort | shar -S -Z -L50 -o /tmp/big |
|
|
95 |
If ''-p'' is specified on the command line, then the options ''-B'', ''-T'', ''-z'' and ''-Z'' may be included in the standard input (on a line separate from filenames). The maximum number of lines of standard input, file names and options, may not exceed 1024. |
|
|
96 |
|
|
|
97 |
|
|
|
98 |
__Splitting output:__ |
|
|
99 |
|
|
|
100 |
|
|
|
101 |
''-o'' XXX ''--output-prefix=''XXX |
|
|
102 |
|
|
|
103 |
|
|
|
104 |
Save the archive to files XXX.01 thru XXX.nn instead of |
|
|
105 |
sending it to standard out. Must be used when the ''-l'' |
|
|
106 |
or the ''-L'' switches are used. |
|
|
107 |
|
|
|
108 |
|
|
|
109 |
''-l'' XX ''--whole-size-limit=''XX |
|
|
110 |
|
|
|
111 |
|
|
|
112 |
Limit the output file size to XXk bytes but don't split |
|
|
113 |
input files. |
|
|
114 |
|
|
|
115 |
|
|
|
116 |
''-L'' XX ''--split-size-limit=''XX |
|
|
117 |
|
|
|
118 |
|
|
|
119 |
Limit output file size to XXk bytes and split files if |
|
|
120 |
necessary. The archive parts created with this option must |
|
|
121 |
be unpacked in correct order. |
|
|
122 |
|
|
|
123 |
|
|
|
124 |
__Controlling the shar headers:__ |
|
|
125 |
|
|
|
126 |
|
|
|
127 |
''-n'' name ''--archive-name=''name |
|
|
128 |
|
|
|
129 |
|
|
|
130 |
Name of archive to be included in the header of the shar |
|
|
131 |
files. See the ''-a'' switch. |
|
|
132 |
|
|
|
133 |
|
|
|
134 |
''-s'' who@where |
|
|
135 |
''--submitter=''who@where |
|
|
136 |
|
|
|
137 |
|
|
|
138 |
Override automatically determined submitter |
|
|
139 |
name. |
|
|
140 |
|
|
|
141 |
|
|
|
142 |
''-a --net-headers'' |
|
|
143 |
|
|
|
144 |
|
|
|
145 |
Allows automatic generation of headers: |
|
|
146 |
|
|
|
147 |
|
|
|
148 |
Submitted-by: who@where |
|
|
149 |
Archive-name: |
|
|
150 |
The -n'' switch. If name includes a '/' '' |
|
|
151 |
|
|
|
152 |
|
|
|
153 |
-n xyzzy produces: |
|
|
154 |
xyzzy/part01 |
|
|
155 |
xyzzy/part02 |
|
|
156 |
-n xyzzy/patch produces: |
|
|
157 |
xyzzy/patch01 |
|
|
158 |
xyzzy/patch02 |
|
|
159 |
-n xyzzy/patch01. produces: |
|
|
160 |
xyzzy/patch01.01 |
|
|
161 |
xyzzy/patch01.02 |
|
|
162 |
|
|
|
163 |
|
|
|
164 |
The who@where can be explicitly stated with the ''-s'' |
|
|
165 |
switch if the default isn't appropriate. Who@where is |
|
|
166 |
essentially built as `whoami`@`uname`. |
|
|
167 |
|
|
|
168 |
|
|
|
169 |
''-c --cut-mark'' |
|
|
170 |
|
|
|
171 |
|
|
|
172 |
Start the shar with a cut line. A line saying 'Cut here' is |
|
|
173 |
placed at the start of each output file. |
|
|
174 |
|
|
|
175 |
|
|
|
176 |
__Selecting how files are stocked:__ |
|
|
177 |
|
|
|
178 |
|
|
|
179 |
''-M --mixed-uuencode'' |
|
|
180 |
|
|
|
181 |
|
|
|
182 |
Mixed mode. Determine if the files are text or binary and |
|
|
183 |
archive correctly (default). Files found to be binary are |
|
|
184 |
uudecoded prior to packing (USE OF UUENCODE IS NOT |
|
|
185 |
APPRECIATED BY MANY ON THE NET). |
|
|
186 |
|
|
|
187 |
|
|
|
188 |
''-T --text-files'' |
|
|
189 |
|
|
|
190 |
|
|
|
191 |
Treat all files as text. |
|
|
192 |
|
|
|
193 |
|
|
|
194 |
''-B --uuencode'' |
|
|
195 |
|
|
|
196 |
|
|
|
197 |
Treat all files as binary, use uuencode prior to packing. |
|
|
198 |
This increases the size of the archive. The recipient must |
|
|
199 |
have uudecode in order to unpack. (USE OF UUENCODE IS NOT |
|
|
200 |
APPRECIATED BY MANY ON THE NET). |
|
|
201 |
|
|
|
202 |
|
|
|
203 |
''-z --gzip'' |
|
|
204 |
|
|
|
205 |
|
|
|
206 |
Gzip and uuencode all files prior to packing. The recipient |
|
|
207 |
must have uudecode and gzip in order to unpack (USE OF |
|
|
208 |
UUENCODE AND GZIP IS NOT APPRECIATED BY MANY ON THE |
|
|
209 |
NET). |
|
|
210 |
|
|
|
211 |
|
|
|
212 |
''-g'' LEVEL ''--level-for-gzip=''LEVEL |
|
|
213 |
|
|
|
214 |
|
|
|
215 |
When doing compression, use '-LEVEL' as a parameter to gzip. |
|
|
216 |
Default is 9. The ''-g'' option turns on the ''-z'' |
|
|
217 |
option by default. |
|
|
218 |
|
|
|
219 |
|
|
|
220 |
''-Z --compress'' |
|
|
221 |
|
|
|
222 |
|
|
|
223 |
Compress and uuencode all files prior to packing. The |
|
|
224 |
recipient must have uudecode and compress in order to unpack |
|
|
225 |
(USE OF UUENCODE AND COMPRESS IS NOT APPRECIATED BY MANY ON |
|
|
226 |
THE NET). Option ''-C'' is synonymous to ''-Z'', but |
|
|
227 |
is being deprecated. |
|
|
228 |
|
|
|
229 |
|
|
|
230 |
''-b'' BITS ''--bits-per-code=''BITS |
|
|
231 |
|
|
|
232 |
|
|
|
233 |
When doing compression, use '-bBITS' as a parameter to |
|
|
234 |
compress. The ''-B'' option turns on the ''-Z'' option |
|
|
235 |
by default. Default value is 12. |
|
|
236 |
|
|
|
237 |
|
|
|
238 |
__Protecting against transmission errors:__ |
|
|
239 |
|
|
|
240 |
|
|
|
241 |
''-w --no-character-count'' |
|
|
242 |
|
|
|
243 |
|
|
|
244 |
Do NOT check each file with 'wc -c' after unpack. The |
|
|
245 |
default is to check. |
|
|
246 |
|
|
|
247 |
|
|
|
248 |
''-D --no-md5-digest'' |
|
|
249 |
|
|
|
250 |
|
|
|
251 |
Do NOT use 'md5sum' digest to verify the unpacked files. The |
|
|
252 |
default is to check. |
|
|
253 |
|
|
|
254 |
|
|
|
255 |
''-F --force-prefix'' |
|
|
256 |
|
|
|
257 |
|
|
|
258 |
Forces the prefix character (normally 'X' unless the |
|
|
259 |
parameter to the ''-d'' option starts with 'X') to be |
|
|
260 |
prepended to every line even if not required. This option |
|
|
261 |
may slightly increase the size of the archive, especially if |
|
|
262 |
''-B'' or ''-Z'' is used. |
|
|
263 |
|
|
|
264 |
|
|
|
265 |
''-d'' XXX ''--here-delimiter=''XXX |
|
|
266 |
|
|
|
267 |
|
|
|
268 |
Use XXX to delimit the files in the shar instead of |
|
|
269 |
SHAR_EOF. This is for those who want to personalize their |
|
|
270 |
shar files. |
|
|
271 |
|
|
|
272 |
|
|
|
273 |
__Producing different kinds of shars:__ |
|
|
274 |
|
|
|
275 |
|
|
|
276 |
''-V --vanilla-operation'' |
|
|
277 |
|
|
|
278 |
|
|
|
279 |
Produce |
|
|
280 |
-x'' option is used. The ''-V'' silently |
|
|
281 |
disables options offensive to the |
|
|
282 |
''-B'', ''-z'', ''-Z'', ''-p'' or |
|
|
283 |
''-M'' (any of which does or might require uudecode, gzip |
|
|
284 |
or compress in the unsharing environment). |
|
|
285 |
|
|
|
286 |
|
|
|
287 |
''-P --no-piping'' |
|
|
288 |
|
|
|
289 |
|
|
|
290 |
Use temporary files instead of pipes in the shar |
|
|
291 |
file. |
|
|
292 |
|
|
|
293 |
|
|
|
294 |
''-x --no-check-existing'' |
|
|
295 |
|
|
|
296 |
|
|
|
297 |
Overwrite existing files without checking. If neither |
|
|
298 |
''-x'' nor ''-X'' is specified, the unpack will check |
|
|
299 |
for and not overwrite existing files when unpacking the |
|
|
300 |
archive. If ''-c'' is passed as a parameter to the script |
|
|
301 |
when unpacking: |
|
|
302 |
|
|
|
303 |
|
|
|
304 |
sh archive -c |
|
|
305 |
|
|
|
306 |
|
|
|
307 |
then existing files will be overwritten |
|
|
308 |
unconditionally. |
|
|
309 |
|
|
|
310 |
|
|
|
311 |
''-X --query-user'' |
|
|
312 |
|
|
|
313 |
|
|
|
314 |
When unpacking, interactively ask the user if files should |
|
|
315 |
be overwritten. (DO NOT USE FOR SHARS SUBMITTED TO THE |
|
|
316 |
NET). |
|
|
317 |
|
|
|
318 |
|
|
|
319 |
''-m --no-timestamp'' |
|
|
320 |
|
|
|
321 |
|
|
|
322 |
Avoid generating 'touch' commands to restore the file |
|
|
323 |
modification dates when unpacking files from the |
|
|
324 |
archive. |
|
|
325 |
|
|
|
326 |
|
|
|
327 |
''-Q --quiet-unshar'' |
|
|
328 |
|
|
|
329 |
|
|
|
330 |
Verbose OFF. Disables the inclusion of comments to be output |
|
|
331 |
when the archive is unpacked. |
|
|
332 |
|
|
|
333 |
|
|
|
334 |
''-f --basename'' |
|
|
335 |
|
|
|
336 |
|
|
|
337 |
Restore by filename only, rather than path. This option |
|
|
338 |
causes only file names to be used, which is useful when |
|
|
339 |
building a shar from several directories, or another |
|
|
340 |
directory. Note that if a directory name is passed to shar, |
|
|
341 |
the substructure of that directory will be restored whether |
|
|
342 |
''-f'' is specified or not. |
|
|
343 |
|
|
|
344 |
|
|
|
345 |
__Internationalization:__ |
|
|
346 |
|
|
|
347 |
|
|
|
348 |
''--no-i18n'' |
|
|
349 |
|
|
|
350 |
|
|
|
351 |
Do not produce internationalized shell archives, use default |
|
|
352 |
english messages. By default, shar produces archives that |
|
|
353 |
will try to output messages in the unpackers preferred |
|
|
354 |
language (as determined by the LANG/LC_MESSAGES |
|
|
355 |
environmental variables) when they are unpacked. If no |
|
|
356 |
message file for the unpackers language is found at unpack |
|
|
357 |
time, messages will be in english. |
|
|
358 |
|
|
|
359 |
|
|
|
360 |
''--print-text-domain-dir'' |
|
|
361 |
|
|
|
362 |
|
|
|
363 |
Prints the directory shar looks in to find messages files |
|
|
364 |
for different languages, then immediately |
|
|
365 |
exits. |
|
|
366 |
!!EXAMPLES |
|
|
367 |
|
|
|
368 |
|
|
|
369 |
shar *.c |
|
|
370 |
!!WARNINGS |
|
|
371 |
|
|
|
372 |
|
|
|
373 |
No chmod or touch is ever generated for directories created |
|
|
374 |
when unpacking. Thus, if a directory is given to shar, the |
|
|
375 |
protection and modification dates of corresponding unpacked |
|
|
376 |
directory may not match those of the original. |
|
|
377 |
|
|
|
378 |
|
|
|
379 |
If a directory is passed to shar, it may be scanned more |
|
|
380 |
than once. Therefore, one should be careful not change the |
|
|
381 |
directory while shar is running. |
|
|
382 |
|
|
|
383 |
|
|
|
384 |
Be careful that the output file(s) are not included in the |
|
|
385 |
inputs or shar may loop until the disk fills up. Be |
|
|
386 |
particularly careful when a directory is passed to shar that |
|
|
387 |
the output files are not in that directory (or a |
|
|
388 |
subdirectory of that directory). |
|
|
389 |
|
|
|
390 |
|
|
|
391 |
Use of the ''-B'', ''-z'' or ''-Z'', and especially |
|
|
392 |
''-M'', may slow the archive process considerably, |
|
|
393 |
depending on the number of files. |
|
|
394 |
|
|
|
395 |
|
|
|
396 |
Use of ''-X'' produces shars which ''WILL'' cause |
|
|
397 |
problems with many unshar procedures. Use this feature only |
|
|
398 |
for archives to be passed among agreeable parties. |
|
|
399 |
Certainly, ''-X'' is NOT for shell archives which are to |
|
|
400 |
be submitted to Usenet. Usage of ''-B'', ''-z'' or |
|
|
401 |
''-Z'' in net shars will cause you to be flamed off the |
|
|
402 |
earth. Not using ''-m'' or not using ''-F'' may also |
|
|
403 |
get you occasional complaints. |
|
|
404 |
!!SEE ALSO |
|
|
405 |
|
|
|
406 |
|
|
|
407 |
unshar(1) |
|
|
408 |
!!DIAGNOSTICS |
|
|
409 |
|
|
|
410 |
|
|
|
411 |
Error messages for illegal or incompatible options, for |
|
|
412 |
non-regular, missing or inaccessible files or for (unlikely) |
|
|
413 |
memory allocation failure. |
|
|
414 |
!!AUTHORS |
|
|
415 |
|
|
|
416 |
|
|
|
417 |
The shar and unshar programs is the collective work of many |
|
|
418 |
authors. Many people contributed by reporting problems, |
|
|
419 |
suggesting various improvements or submitting actual code. A |
|
|
420 |
list of these people is in the THANKS file in the sharutils |
|
|
421 |
distribution. |
|
|
422 |
---- |