Skip to Main Content
Linux in a Nutshell, Fourth Edition
book

Linux in a Nutshell, Fourth Edition

by Ellen Siever, Stephen Figgins, Aaron Weber
June 2003
Beginner to intermediate content levelBeginner to intermediate
944 pages
43h 1m
English
O'Reilly Media, Inc.
Content preview from Linux in a Nutshell, Fourth Edition

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

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Linux in a Nutshell, 6th Edition

Linux in a Nutshell, 6th Edition

Ellen Siever, Stephen Figgins, Robert Love, Arnold Robbins
Linux in Action

Linux in Action

David Clinton
Hands-On System Programming with Linux

Hands-On System Programming with Linux

Kaiwan N. Billimoria, Tigran Aivazian
Embedded Linux for Developers

Embedded Linux for Developers

Alexandru Vaduva, Alex González, Chris Simmonds

Publisher Resources

ISBN: 0596004826