GNU shar utilities - 4. Miscellaneous considerations

Go to the first, previous, next, last section, table of contents.

# 4. Miscellaneous considerations

Here is a place-holder for many considerations which do not fit elsewhere, while not worth a section for themselves.

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).

When a directory is passed to `shar`, it may be scanned more than once, to conserve memory. Therefore, one should be careful to not change the directory contents while `shar` is running.

No attempt is made to restore the protection and modification dates for directories, even if this is done by default for files. Thus, if a directory is given to `shar`, the protection and modification dates of corresponding unpacked directory may not match those of the original.

Use of the `-M` or `-B` options will slow down the archive process. Use of the `-z` or `-Z` options may slow the archive process considerably.

Let us conclude by a showing a few examples of `shar` usage:

    shar *.c > cprog.shar
    shar -v *.[ch] > cprog.shar
    shar -B -l28 -oarc.sh. *.arc
    shar -f /lcl/src/u*.c > u.sh

The first shows how to make a shell archive out of all C program sources. The second produces a shell archive with all ``.c'` and ``.h'` files, which unpacks silently. The third gives a shell archive of all uuencoded ``.arc'` files, into files ``arc.sh.01'` through to ``arc.sh.nnn'`. The last example gives a shell archive which will use only the file names at unpack time.

Go to the first, previous, next, last section, table of contents.