![]()
|
|
Shar Formats |
|
In the Unix operating system, shar (an abbreviation of shell archive) is an archive format. A shar file is a shell script, and executing it will recreate the files. This is a type of self extracting archive file. It can be created with the Unix shar utility. To extract the files, only the standard Unix Bourne shell sh is usually required. While the shar format has the advantage of being plain text, it poses a risk due to being executable; for this reason the older and more general tar file format is usually preferred even for transferring text files. GNU provides its own version of shar in the GNU Sharutils collection. Shell archive is a shell script that, when executed on a POSIX-compliant system, will recreate a collection of file system objects. Shar files are shell scripts and can theoretically do anything that a shell script can do (including using incompatible features of enhanced or workalike shells), limiting their utility outside the Unix world. WinTar can write two different kinds of shar archives: |
SharThe traditional shar format uses a limited set of POSIX commands, including echo, mkdir, and sed. It is suitable for portably archiving small collections of plain text files. However, it is not generally well-suited for large archives (many implementations of sh have limits on the size of a script) nor should it be used with non-text files. |
ShardumpThis format is similar to shar but encodes files using uuencode so that the result will be a plain text file regardless of the file contents. It also includes additional shell commands that attempt to reproduce as many file attributes as possible, including owner, mode, and flags. The additional commands used to restore file attributes make shardump archives less portable than plain shar archives. |
Related file formats
|
| Copyright © 2007 Miscosoftware, Inc. All rights reserved. |