Shar

From Wikipedia, the free encyclopedia

The correct title of this article is shar. The initial letter is shown capitalized due to technical restrictions.

In the Unix operating system, shar is an abbreviation of SHell ARchive. A shell archive is a shell script, and executing it will recreate the files. Directories are not recreated. This is a type of self extracting archive file. It can be created with the Unix 'shar' utility. To unarchive the files, only the standard Unix Bourne shell 'sh' is usually required. While the shar format has the advantage of being pure text, it poses a risk due to being executable; hence 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.

"unshar" programs have been written for other operating systems but are not always reliable; .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.

[edit] See also

In other languages