NUSHAR(1)                                                            NUSHAR(1)

       nushar - create self extracting shell archives

       nushar  [-bcf]  [-B  binsize]  [-d  delimiter] [-i infile] [-O destdir]
       [-p prefix] [-t final_text] [files]
       nushar [-bcf] [-d  delimiter]  [-e  nn/mm]  [-i  infile]  [-o  outfile]
       [-p prefix] [-t final_text] [files]
       nushar -h
       nushar -V

       Nushar  is the ultimate shell archiver.  It can pack files, devices and
       named pipes (we don't pack sockets because there  are  no  shell  level
       commands  to  create  them).  Binary files are automatically uuencoded.
       You don't have to worry about directory creation (the necessary  direc-
       tories  are  created automatically).  It can binpack all the files into
       multiple parts which can be extracted in any order  (see  -O  for  more

       This command reads the environment variable NUSHAR for options.

              Flatten  the  directory  tree  by stripping everything up to and
              including the last '/' in the filenames.  The resulting  archive
              will  extract  its contents into the current directory.  It will
              contain no directory creation commands.

       -B binsize
              Specify the target binsize of the shar files created when nushar
              is  binpacking your input files for you.  See -O for more infor-

              Generate code to check the sizes of extracted files  by  calling
              wc(1) and comparing against the original size.

       -d delimiter
              Specify the here-document delimiter (default "END_OF_FILE").  If
              you aren't using a packing prefix (see  -p)  and  you  have  the
              string  'END_OF_FILE'  at  the  beginning of a line somewhere in
              your input files  (for  example,  if  you're  including  another
              nushar  archive)  you  can  use this to change the here-document
              delimiter (see the manual page for sh).

       -e nn/mm
              Specify part nn of mm total, if you are  creating  a  multi-part
              archive  manually.   The  resulting  archive piece will tell the
              user what part it is and will include code at the  end  to  make
              sure that all parts are successfully extracted.

              Generate  code  to  set the date and mode of the extracted files
              using touch.  If the version  of  touch  on  the  remote  system
              doesn't  support the extensions necessary for this, the extract-
              ing archive will silently skip this step.

              Print only a help message.

       -i infile
              Specify a file with a list of files to shar, one file per  line.
              This  is  especially  useful  with  the  output of find with the
              -print option; use "-" (a single dash) for stdin.

       -o outfile
              Specify an output filename (defaults to stdout) for  the  result
              of a single-part archive creation.

       -O destdir
              Specify  the  output  directory  for binpacked shar files.  When
              operating in the binpacking  mode,  nushar  wraps  each  of  the
              source  files in its piece of shell code, and then binpacks them
              to create the fewest archives it can without exceeding the  tar-
              get size (see the -B option).  Each archive part will have a few
              lines added at the top to create all the  directories  necessary
              to  extract  that  part.   This can cause the part to exceed the
              specified size if there are  many  small  files  from  different
              directories  in that shell part.  The parts will be written into
              the directory specified by this option.  Each of the parts  will
              tell the user which part it is and check to see if all the parts
              have been extracted (as with the -e option).

       -p prefix
              Specify a prefix for each  line  of  the  shar'd  files  in  the
              archive.   This allows you to add a "place-holding" character in
              the archive to prevent brain-dead sh implementations from  drop-
              ping leading whitespace.

       -t final_text
              Specify  a  string  of instructions to give the user when all of
              the parts have  successfully  extracted.   This  is  useful  for
              telling the recipient what to do with their new files, or how to
              compile them.  Usually this just points to a "README" file  that
              was just extracted.

              Show only version information.

       nushar -o - /etc/motd | ${PAGER:-less}
              Build  a shell archive of the message of the day file, then send
              it to your pager.

       find ./msrc -name html -print | nushar -B 131072 -f -O /tmp/ksb  -i -
              Build archive parts of about 128k for all the HTML  files  under
              the current working directory in a temporary directory.

       If there are many small files from different directories in a binpacked
       archive part, the archive size can exceed the specified part size  when
       all the directory creation commands are added.

       As above, the use of -f to restore timestamps adds significant overhead
       to the archive, which is not included  in  the  size  computation  (and
       should be).

       The  path  that  is  at  the top of the archive nushar creates was con-
       structed by finding all the commands that  might  be  called  from  the
       archive  on  various  UNIX  systems  and taking the union of all of the
       directories in which they were found.  There is almost certainly a fla-
       vor  of UNIX that doesn't have the commands the archive is expecting in
       the path it has specified.  Since the archive just augments any  exist-
       ing path, most users will never notice.

       Large files (those larger than binsize) should be broken across archive
       parts.  Unpacking such archives in a reverse order  (every  even  part,
       followed  by  every  odd  part  in  reverse)  made a mess of the target
       machine's $TMPDIR.

       This program is not being updated, since few people use shars  anymore.

       Ben Jackson & Kevin Braunsdorf & nushar at

       find(1), sh(1), wc(1), touch(1), sharfilter(8), binpack(1l)

                                     LOCAL                           NUSHAR(1)