| www.delorie.com/gnu/docs/sharutils/shar.1.html | search |
![]() Buy GNU books! | |
shar [ options ] file ...
shar -S [ options ]
Options have a one letter version starting with - or a long version starting with --. The exception is --help, --version, --no-i18n and --print-text-domain-dir which does not have short versions. Mandatory arguments to long options are mandatory for short options too. Options can be given in any order. Some options depend on each other:
The -o option is required if the -l or -L option is used.
The -n option is required if the -a option is used.
See -V below.
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.
find . -type f -print | sort | shar -S -Z -L50 -o /tmp/big
Submitted-by: who@whereThe <name> must be given with the -n switch. If name includes a '/' "/part" isn't used. Thus:
Archive-name: <name>/part##
-n xyzzy produces:
xyzzy/part01
xyzzy/part02
-n xyzzy/patch produces:
xyzzy/patch01
xyzzy/patch02
-n xyzzy/patch01. produces:
xyzzy/patch01.01
xyzzy/patch01.02
shar *.c > cprog.shar # all C prog sources
shar -Q *.[ch] > cprog.shar # non-verbose, .c and .h files
shar -B -l28 -oarc.sh *.arc # all binary .arc files, into
# files arc.sh.01 thru arc.sh.NN
shar -f /lcl/src/u*.c > u.sh # use only the filenames
No chmod or touch is ever generated for directories created when unpacking. Thus, if a directory is given to shar, the protection and modification dates of corresponding unpacked directory may not match those of the original.
If a directory is passed to shar, it may be scanned more than once. Therefore, one should be careful not change the directory while shar is running.
Be careful that the output file(s) are not included in the inputs or shar may loop until the disk fills up. Be particularly careful when a directory is passed to shar that the output files are not in that directory (or a subdirectory of that directory).
Use of the -B, -z or -Z, and especially -M, may slow the archive process considerably, depending on the number of files.
Use of -X produces shars which WILL cause problems with many unshar procedures. Use this feature only for archives to be passed among agreeable parties. Certainly, -X is NOT for shell archives which are to be submitted to Usenet. Usage of -B, -z or -Z in net shars will cause you to be flamed off the earth. Not using -m or not using -F may also get you occasional complaints.
unshar(1)
Error messages for illegal or incompatible options, for non-regular, missing or inaccessible files or for (unlikely) memory allocation failure.
| webmaster donations bookstore | delorie software privacy |
| Copyright © 2003 by The Free Software Foundation | Updated Jun 2003 |