O'Reilly logo

Linux in a Nutshell, Fourth Edition by Aaron Weber, Stephen Figgins, Ellen Siever

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

shar

Synopsis

                  shar [options] files
                  shar -S [options]

Create shell archives (“shar” files) that are in text format and can be mailed. These files may be unpacked later by executing them with /bin/sh. Other commands may be required on the recipient’s system, such as compress, gzip, and uudecode. The resulting archive is sent to standard output unless the -o option is given.

Options

-a, --net-headers

Allows automatic generation of headers. The -n option is required if the -a option is used.

-b bits, --bits-per-code= bits

Use -b bits as a parameter to compress (when doing compression). Default value is 12. The -b option automatically turns on -Z.

-c, --cut-mark

Start the shar file with a line that says “Cut here.”

-d delimiter, --here-delimiter= delimiter

Use delimiter for the files in the shar instead of SHAR_EOF.

-f, --basename

Causes only simple filenames to be used when restoring, which is useful when building a shar from several directories or another directory. (If a directory name is passed to shar, the substructure of that directory will be restored whether or not -f is used.)

-g level, --level-for-gzip=level

Use -level as a parameter to gzip (when doing compression). Default is 9. The -g option turns on the -z option by default.

--help

Print a help summary on standard output, then exit.

-l nn, --whole-size-limit= nn

Limit the output file size to nn kilobytes but don’t split input files. Requires use of -o.

-m, --no-timestamp

Don’t generate touch commands to restore the file ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required