home *** CD-ROM | disk | FTP | other *** search
/ rtsi.com / 2014.01.www.rtsi.com.tar / www.rtsi.com / OS9 / OSK / ARCHIVERS / lhasrc.lzh / lha.doc < prev    next >
Text File  |  1992-08-29  |  14KB  |  382 lines

  1. ------------------------------------------------------------------------
  2. ------------------------------------------------------------------------
  3.  
  4.  
  5.                              LHa Vrs. 2.03
  6.  
  7.                            for OSK (OS9/68000)
  8.  
  9.           Compatible with version 2.11 of Lha for MSDOS systems
  10.  
  11.             OSK port by Mike Haaland (CompuServe: 72300,1433)
  12.  
  13.                             June 15, 1992
  14.  
  15.                      Last Updated:  Aug 29, 1992
  16.  
  17.  
  18. ------------------------------------------------------------------------
  19. ------------------------------------------------------------------------
  20.  
  21.  
  22.  --- Introduction ---
  23.  
  24. Lha is an archive program such as Arc and Zoo. It can store several
  25. files in one archive in a compressed form which is generally more
  26. efficent than that used by Arc and Zoo.  It also supplies all of the
  27. archive handling capabilities that an archive program should have.
  28.  
  29. Another important feature of Lha is its ability to preserve the file
  30. attributes.
  31.  
  32. Its only weakness is compression speed: Zoo 2.0, for example, is
  33. faster, but if compression efficency is more important for you than
  34. compression time you'll surely appreciate this progam. (anyway
  35. decompression is much faster than compression)
  36.  
  37.  
  38.  
  39.  --- How to use ---
  40.  
  41. Lha is run from shell with the following command line:
  42.  
  43.   Lha -<command>[<options>] <Archive> [<file patterns>]
  44.  
  45. items in square brackets are optional.
  46.  
  47.  
  48.  
  49. <Command> can be any of the following (case is not significant):
  50.  
  51.  
  52.   e,x  extract files from archive
  53.        Extracts files from archives. If you specify some file names
  54.        or patterns only those files satisfying the patterns are
  55.        extracted, otherwise all the files in the archive are
  56.        extracted.  While extracting files, Lha checks if a file by 
  57.        the same name already exsists in the destination directory and
  58.        prompts you before overwriting the old file with the extracted 
  59.        one (unless you specified the -f option)  If the files have a 
  60.        path name stored in the archive, they are extracted with their
  61.        path and needed directories are automatically created.
  62.  
  63.   l    List archives contents
  64.        Displays the names of the files in an archive along with their
  65.        date, time, CRC, original length and compressed length.
  66.  
  67.   v    Verbose list of archives contents
  68.        Same as 'l', but will show extended header info and machine
  69.        that the archive was created on.  Moreover 'v' will also show 
  70.        all attributes etc.
  71.  
  72.   p    extract and print files to screen
  73.        same as 'e' and 'x', but extracted files are sent to stdout
  74.        A print header is also shown and looks like:
  75.  
  76.        ::::::::::FILENAME::::::::::
  77.  
  78.        This feature is included so when redirected to the printer,
  79.        you know which file you printed.  You may turn off the print
  80.        header by using -pq (The'q' singifies quiet mode)
  81.  
  82.   a    Add to existing archives or create a new archives
  83.        Files are stored in alphabetical order.
  84.  
  85.        If you try to archive a file and a file by the same name
  86.        already exists in the archive the file will not be added
  87.        and a message will be printed on the screen to inform you. 
  88.  
  89.        Also, by default file attributes are stored, use the 'g'
  90.        option to create [GENERIC] format archives.
  91.  
  92.   m    Move files into archive
  93.        Same as add, but deletes original files after archiving them
  94.  
  95.   d    Delete files from archives
  96.        You can delete from an archive.
  97.  
  98.   u    Update files in archives
  99.        Same as with the 'a' command.  However, if a file already 
  100.        exists in the archive, Lha will check its time stamp and will
  101.        keep the newer one and ignore the older one.
  102.  
  103.   c    reConstruct an archive
  104.        Replaces a file in the archive with the newer one only if a 
  105.        file with the same name already exists in the archive.
  106.        Otherwise, no action is taken.
  107.  
  108.   t    Test integrity of the archive
  109.        Allows making sure the archive is intact.
  110.  
  111. <Archive> is the name (eventually preceded by a path) of the
  112. archive you want to work on. If no extension is specified the default
  113. extension .LZH is used. 
  114.  
  115. [<file patterns>] represents an optional number of file names
  116. They indicate which files to extract/compress/list/delete, etc. 
  117. Lha is case sensitive, therefor while extracting files from an 
  118. archive individually, the [<file pattern's'>] must match, exactly,
  119. the file names stored in the archive.  When extracting you may specify
  120. a directory as a [<file pattern>] and all files and sub-directories
  121. that are stored in that directory will be extracted from the archive.
  122. For example, it the archive myfiles.lzh contained the following files:
  123.  
  124.  TEST/TEST1/filet1
  125.  TEST/TEST1/filet2
  126.  TEST/file1
  127.  TEST/file2
  128.  file
  129.  
  130. and you wanted to extract all files in TEST/TEST1 only:
  131.  
  132.  lha -x myfiles TEST/TEST1
  133.  
  134. This would extract TEST/TEST1/filet1 and TEST/TEST1/filet2 only.
  135.  
  136.  lha -x myfiles TEST
  137.  
  138. will extract the TEST directory, all files within it and also extract
  139. TEST/TEST1 and all it's files also.
  140.  
  141. [<options>] represents an optional number of switches that are used
  142. to change the behavior of the program.  A switch is composed by a 
  143. leading '-' followed by a command and then may immediatly followed 
  144. by one or more options.  Example:
  145.  
  146. Lha -pq archive.lzh readme.txt 
  147.  
  148. This tells Lha to extract 'readme.txt' from 'archive.lzh' and print
  149. it to standard out, with no print header.  You need not supply an 
  150. option in the switch, but must supply a command.
  151.  
  152. Here is a summary of the available options:
  153.  
  154.    v  Verbose
  155.       prints lots of neat info to let you know exactly what LHa is
  156.       doing.
  157.  
  158.    q  Quiet mode
  159.       Suppresses the display of what files are being processed
  160.       during compression or decompression.  Also inhibits the output
  161.       of the print header during '-p' operations.
  162.  
  163.    f  Force overwrite on EXtraction/Update modes
  164.       Suppresses all the queries Lha normally issues before
  165.       overwriting existing files.
  166.  
  167.    g  create GENERIC archive
  168.       By default Lha will stores and restores file descriptor info
  169.       indicating creation date, last modification, and file attributes,
  170.       in an extended header.  This option will create archives 
  171.       compatible with the MSDOS version:  in other words it will
  172.       store files with an attribute bit pattern which is suitable for 
  173.       MSDOS machines while during extraction it will ignore the
  174.       attributes stored in the archives, setting the attributes of the
  175.       extracted files to the usual read and write attributes.
  176.       If you do not use this switch, on the contrary, files will be 
  177.       stored with their original attributes and during extraction the
  178.       stored attributed will be restored.
  179.       Remember that, to effectively preserve file attributes, you must
  180.       not use this switch during compression.
  181.       Of course OSK file attributes are meaningless to MSDOS and
  182.       vice-versa.  
  183.    
  184.    t  Text mode
  185.       When using the 't' option.  Lha will attempt to change all 
  186.       CR/LF combinations to CR's during extraction and change CR's 
  187.       to CR/LF during compression.  This is useful when you are 
  188.       extracting text files or source code.  This will, as of release
  189.       2.03, change LF's to CR's during extraction if the file contains
  190.       no only LF's. (IE: Amiga [generic] and UNIX text files)
  191.  
  192.    r  Recursive expansion of directories (used with -a/c/u)
  193.       This option, when used with the command '-a', will expand
  194.       and archive any directories or sub-directories given as file
  195.       arguments.  Great for archiving entire disks.
  196.  
  197.    n  Don't execute the command
  198.       Just show what LHa would do if the command was actually executed,
  199.       but don't actually create/extract the files.
  200.  
  201.    d  Delete files  (used with -a/u/c)
  202.       Will delete the file after archiving it to the .lzh file.
  203.  
  204.    i  Ignore file paths (used with -e/x)
  205.       ignore any filepaths stored in the archive and extract the files
  206.       to the current working directory of the directory specified by
  207.       the -w option.
  208.  
  209.    z  Don't compress files (use with -a/u/c)
  210.       Store the files as-is.  Don't attempt to compress them.
  211.  
  212.    o  use LHarc compatible compression methods (used with -a/u/c)
  213.       This allows creation of .lzh files that the older LHarc's
  214.       can take apart.
  215.       
  216.    0/1/2  Header level
  217.       Specify the header level to use when creating .lzh files.
  218.  
  219.    w=<dir>  allows extraction to <dir>
  220.       Handy when you don't want the to extract to the current working
  221.       directory.
  222.  
  223.  --- Temporary files ---
  224.  
  225. While compressing files Lha creates a temporary file called
  226. 'LhXXXXXX' where XXXXXX is a hex digit representing the process ID.
  227. This file is created in the current working directory.  You may specify
  228. a different directory to create the 'LHXXXXXX' file in by setting the
  229. environment variable TMPDIR.
  230.  
  231. The reason for the XXXXXX part of the name is that if you run multiple
  232. copies of Lha at the same time each copy will create its own temporary
  233. file with a different name (usefull for multiuser systems for example).
  234. Also, if adding files to an existing .LZH file, Lha will rename the 
  235. original .LZH file to file.bak.   If file.bak already exists it will be
  236. silently overwritten.
  237.  
  238. NOTE:  rename no longer must be available for use by Lha!!!
  239.  
  240.  
  241.  --- Bugs ---
  242.  
  243. No known bugs at this time.  If you find any, please notify me by any
  244. means available to you.
  245.  
  246.  
  247.  --- FYI ---
  248.  
  249. If you supply only an archive name on the command line, LHa will use
  250. the -l command on the archive and give you a listing of it's contents.
  251.  
  252. LHa can now read a list of files from stdin an example would be to
  253. pipe the output of 'dir -u' or re-direct the input from a file having
  254. filenames 1 per line.
  255.  
  256. Such as:
  257.  
  258.  dir -u ! lha -a myfiles
  259.  
  260.  or
  261.  
  262.  lha -a myfiles <my_file_list
  263.  
  264. LHa will properly archive and extract directories.  This is very handy
  265. for source code, etc.  For example:
  266.  
  267.  dir -u ! lha -ar stuff.lzh
  268.  
  269.  or
  270.  
  271.  lha -ar stuff.lzh *
  272.  
  273. will archive everything in the current directory, and all sub-directories
  274. below it.  Upon extraction, lha will create the sub-directories if they
  275. do not exist.
  276.  
  277. If you are having difficulty with taking apart SelF-eXtracting archives,
  278. try renaming the archive with the extension .exe or .com.  Lha looks at
  279. the file extention to determine if the archive is of the self-extracting
  280. type.
  281.  
  282. LHarc OSK Version 1.0
  283.  
  284. Ported from the UNIX sources Vrs. 1.02 by Mike Haaland     10/14/1990
  285.  
  286. Vrs. 1.00 - 
  287.      
  288.   o Establishes an OSK extended header that allows saving file 
  289.     descriptor info in archives created on an OSK machine, which,
  290.      when extracted on another OSK machine will be retained.  All
  291.     other Machines will think the archive is in a "GENERIC" format
  292.     and will still be able to take apart the archive.
  293.  
  294. Vrs. 1.01 -
  295.  
  296.   o Added display of storage method in the verbose -lv or -vv options.
  297.   o No longer requires 'cio' (OSK 2.2 would choke on the Makdir calls)
  298.  
  299. Vrs. 1.03 - module edition 14
  300.  
  301.   o Added recursive directory archiving '-r' option.
  302.   o Also LHarc will now set the creation and modification dates to
  303.     match those in a [Generic] .lzh file upon extraction.
  304.   o Removed the 'rename' dependency.
  305.   o Changed Lharc to no longer accepts hardcode pathnames during
  306.     archiving. (IE: /dd/file)  Only relative pathnames are allowed.
  307.   o Zero length filenames are now displayed when archiving and
  308.     during extraction if the 'v' option is used.
  309.   o The environment variable TMPDIR is check, if it exists, all
  310.     temporary files used by Lharc will be created in that directory.
  311.   o Fixed LHarc to delete temporary file if no valid filenames are
  312.     given during -a 'add' command.
  313.  
  314. LHa Vrs. 2.01 - modules edition 2
  315.  
  316.   o Now handles newer compression methods -lh5- -lhd- and -lh0-
  317.  
  318. LHa Vrs. 2.03 - Module edition 3
  319.  
  320.   o Added EOL conversion of LF's to CR's during extraction while using
  321.     the 't' text option.
  322.     
  323.  --- Compatibility ---
  324.  
  325. This program is aimed at full compatibility with the MSDOS version
  326. 2.11 of Lha and UNIX version 2.00.
  327.  
  328. As noted above, LHa will now, unfreeze LHA archives.
  329.  
  330.  
  331.  --- Acknowledgements ---
  332.  
  333. First of all I give credit to Haruyasu Yoshizaki for devising such an
  334. efficent compression algorythm as LZHUF.
  335. And Y. Tagawa, who did the UNIX port of Lharc, which is what the OSK
  336. version is based upon.
  337.  
  338. Also to Paolo Zibette - Fidonet 2:331/101.6 - who wrote the Amiga
  339. version of Lharc and documented the features in english.  (Without
  340. his docs as a starting point, you'd still have none!!!)  ;-)
  341.  
  342.  
  343.  --- How to Reach Me ---
  344.  
  345. I may be reached the following ways: 
  346.  
  347. Phone (Voice) :  (702) 362-5346
  348. CompuServe    :  72300,1433
  349. Internet      :  mike@htsmm1.las-vegas.nv.us
  350. Delphi        :  MIKEHAALAND
  351. US Mail       :  4341 Gannet Cir #174, Las Vegas, NV. 89103  U.S.A.
  352.              
  353. Mike Haaland
  354.  
  355. --------------------------------------------------------------------
  356.  
  357. This is the output of lha -?
  358.  
  359. LHa Vrs. 2.03 for OSK - Ported June 15, 1992  M.Haaland
  360. Syntax: LHa -{axelvudmcp}[qvnfodizg012][w=<dir>] archive_file [file...]
  361. Function: Archive Management Utility
  362. Commands:                           Options:
  363.  a   Add (create/replace) to archive q  quiet
  364.  x,e EXtract from archive            v  verbose
  365.  l,v List / Verbose List             n  not execute
  366.  u   Update newer files to archive   f  force (over write at extract)
  367.  d   Delete from archive             t  FILES are TEXT file
  368.  m   Move to archive (means 'ad')    o  use LHarc compatible method (a/u)
  369.  c   re-Construct new archive        w=<dir> specify extract directory (x/e)
  370.  p   Print to STDOUT from archive    d  delete FILES after (a/u/c)
  371.  t   Test file CRC in archive        i  ignore directory path (x/e)
  372.                                      z  files not compress (a/u)
  373.                                      g  [Generic] format (for compatiblity)
  374.                                      0/1/2 header level (a/u)
  375.                                      r  Recursive expansion of dirs (a/u)
  376.  
  377. The environment variable TMPDIR may be set to specify the directory used for
  378. creating temporary files while archiving
  379.  
  380. --------------------------------------------------------------------
  381.  
  382.