home *** CD-ROM | disk | FTP | other *** search
/ rtsi.com / 2014.01.www.rtsi.com.tar / www.rtsi.com / OS9 / OSK / ARCHIVERS / lha208src.lzh / LHA / DOC / lha.doc next >
Text File  |  1994-12-02  |  15KB  |  419 lines

  1. ------------------------------------------------------------------------
  2. ------------------------------------------------------------------------
  3.  
  4.  
  5.                              LHa Vrs. 2.08
  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:  Dec. 2, 1994
  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.    s  Don't compress files (use with -a/u/c)
  210.       Store the files as-is.  Don't attempt to compress them.
  211.  
  212.    z  get list of files to act on from standard input.  Before
  213.       you could redirect stdin without this switch, this caused
  214.       problems when trying to run lha from a shell script.
  215.  
  216.    o  use LHarc compatible compression methods (used with -a/u/c)
  217.       This allows creation of .lzh files that the older LHarc's
  218.       can take apart.
  219.       
  220.    0/1/2  Header level
  221.       Specify the header level to use when creating .lzh files.
  222.  
  223.    w=<dir>  allows extraction to <dir>
  224.       Handy when you don't want the to extract to the current working
  225.       directory.
  226.  
  227.    c  take apart .lzh files created with the first (broken) version
  228.       of LHarc for 6809/OS9. (used with -x/e/l/v)
  229.  
  230.  --- Temporary files ---
  231.  
  232. While compressing files Lha creates a temporary file called
  233. 'LhXXXXXX' where XXXXXX is a hex digit representing the process ID.
  234. This file is created in the current working directory.  You may specify
  235. a different directory to create the 'LHXXXXXX' file in by setting the
  236. environment variable TMPDIR.
  237.  
  238. The reason for the XXXXXX part of the name is that if you run multiple
  239. copies of Lha at the same time each copy will create its own temporary
  240. file with a different name (usefull for multiuser systems for example).
  241. Also, if adding files to an existing .LZH file, Lha will rename the 
  242. original .LZH file to file.bak.   If file.bak already exists it will be
  243. silently overwritten.
  244.  
  245. NOTE:  rename no longer must be available for use by Lha. 
  246.  
  247.  
  248.  --- Bugs ---
  249.  
  250. No known bugs at this time.  If you find any, please notify me by any
  251. means available to you.
  252.  
  253.  
  254.  --- FYI ---
  255.  
  256. If you supply only an archive name on the command line, LHa will use
  257. the -l command on the archive and give you a listing of it's contents.
  258.  
  259. LHa can now read a list of files from stdin an example would be to
  260. pipe the output of 'dir -u' or re-direct the input from a file having
  261. filenames 1 per line.
  262.  
  263. Such as:
  264.  
  265.  dir -u ! lha -az myfiles
  266.  
  267.  or
  268.  
  269.  lha -az myfiles <my_file_list
  270.  
  271. LHa will properly archive and extract directories.  This is very handy
  272. for source code, etc.  For example:
  273.  
  274.  dir -u ! lha -arz stuff.lzh
  275.  
  276.  or
  277.  
  278.  lha -ar stuff.lzh *
  279.  
  280. will archive everything in the current directory, and all sub-directories
  281. below it.  Upon extraction, lha will create the sub-directories if they
  282. do not exist.
  283.  
  284. If you are having difficulty with taking apart SelF-eXtracting archives,
  285. try renaming the archive with the extension .exe or .com.  Lha looks at
  286. the file extention to determine if the archive is of the self-extracting
  287. type.
  288.  
  289. LHarc OSK Version 1.0
  290.  
  291. Ported from the UNIX sources Vrs. 1.02 by Mike Haaland     10/14/1990
  292.  
  293. Vrs. 1.00 - 
  294.      
  295.   o Establishes an OSK extended header that allows saving file 
  296.     descriptor info in archives created on an OSK machine, which,
  297.      when extracted on another OSK machine will be retained.  All
  298.     other Machines will think the archive is in a "GENERIC" format
  299.     and will still be able to take apart the archive.
  300.  
  301. Vrs. 1.01 -
  302.  
  303.   o Added display of storage method in the verbose -lv or -vv options.
  304.   o No longer requires 'cio' (OSK 2.2 would choke on the Makdir calls)
  305.  
  306. Vrs. 1.03 - module edition 14
  307.  
  308.   o Added recursive directory archiving '-r' option.
  309.   o Also LHarc will now set the creation and modification dates to
  310.     match those in a [Generic] .lzh file upon extraction.
  311.   o Removed the 'rename' dependency.
  312.   o Changed Lharc to no longer accepts hardcode pathnames during
  313.     archiving. (IE: /dd/file)  Only relative pathnames are allowed.
  314.   o Zero length filenames are now displayed when archiving and
  315.     during extraction if the 'v' option is used.
  316.   o The environment variable TMPDIR is checked, if it exists, all
  317.     temporary files used by Lharc will be created in that directory.
  318.   o Fixed LHarc to delete temporary file if no valid filenames are
  319.     given during -a 'add' command.
  320.  
  321. LHa Vrs. 2.01 - modules edition 2
  322.  
  323.   o Now handles newer compression methods -lh5- -lhd- and -lh0-
  324.  
  325. LHa Vrs. 2.03 - Module edition 3
  326.  
  327.   o Added EOL conversion of LF's to CR's during extraction while using
  328.     the 't' text option.
  329.  
  330. LHa Vrs. 2.04 - Module edition 4
  331.  
  332.   o Fixed conversion of '\' to '/' in pathnames of GENERIC .lzh files
  333.         
  334. LHa Vrs. 2.05 - Module edition 5
  335.  
  336.   o Changed the old 'z' flag to 's' for store (don't compress) files
  337.   o Added new 'z' flag to mean read list of files from standard in.
  338.     This allows LHa to be run from a shell script.
  339.   o Fixed creation of GENERIC .lzh files with full pathnames.
  340.   o Added extracting the ! filename in .exe and .sfx files as "telop"
  341.  
  342. LHa Vrs. 2.06 - Module edition 6
  343.  
  344.   o Recognize OS-9(6809) archives, and use the attr when restoring them.
  345.  
  346. LHa Vrs. 2.07 - Module edition 7
  347.  
  348.   o Added handling of OS-9(6809) archives, which incorrectly flag
  349.     level 0 archives as level 1.  (Yuck!)
  350.  
  351. LHa Vrs. 2.08 - Module edition 8
  352.  
  353.   o Removed the handling of OS-9(6809) archives, because new OS-9(6809)
  354.     archives now genetate correct headers.
  355.   o Added 'c' option to handle old OS-9(6809) archives, which incorrectly
  356.     flagged level 0 archives as level 1.  (Yuck!)
  357.  
  358.  
  359.  --- Compatibility ---
  360.  
  361. This program is aimed at full compatibility with the MSDOS version
  362. 2.13 of Lha and UNIX version 2.00.
  363.  
  364. As noted above, LHa will now, unfreeze LHA archives.
  365.  
  366.  
  367.  --- Acknowledgements ---
  368.  
  369. First of all I give credit to Haruyasu Yoshizaki for devising such an
  370. efficent compression algorythm as LZHUF.
  371. And Y. Tagawa, who did the UNIX port of Lharc, which is what the OSK
  372. version is based upon.
  373.  
  374. Also to Paolo Zibette - Fidonet 2:331/101.6 - who wrote the Amiga
  375. version of Lharc and documented the features in english.  (Without
  376. his docs as a starting point, you'd still have none!!!)  ;-)
  377.  
  378.  
  379.  --- How to Reach Me ---
  380.  
  381. I may be reached the following ways: 
  382.  
  383. Phone (Voice) :  (303) 730-1292
  384. CompuServe    :  72300,1433
  385. Internet      :  mikeh@vkgs.com
  386. US Mail       :  5116 S. Delaware #C-216, Englewook, CO. 80110  U.S.A.
  387.              
  388. Mike Haaland
  389.  
  390. --------------------------------------------------------------------
  391.  
  392. This is the output of lha -?
  393.  
  394. LHa Vrs. 2.08 for OSK - revised Dec. 2, 1994  M.Haaland
  395. Syntax: LHa -{axelvudmcp}[qvnfodiszgc012][w=<dir>] archive_file [file...]
  396. Function: Archive Management Utility
  397. Commands:                           Options:
  398.  a   Add (create/replace) to archive q  quiet
  399.  x,e EXtract from archive            v  verbose
  400.  l,v List / Verbose List             n  not execute
  401.  u   Update newer files to archive   f  force (over write at extract)
  402.  d   Delete from archive             t  FILES are TEXT file
  403.  m   Move to archive (means 'ad')    o  use LHarc compatible method (a/u)
  404.  c   re-Construct new archive        w=<dir> specify extract directory (x/e)
  405.  p   Print to STDOUT from archive    d  delete FILES after (a/u/c)
  406.  t   Test file CRC in archive        i  ignore directory path (x/e)
  407.                                      g  [Generic] format (for compatiblity)
  408.                                      0/1/2 header level (a/u)
  409.                                      c  bad CoCo OS-9 archive (x/l)
  410.                                      s  store - don't compress files (a/u)
  411.                                      z  get list of file from standard input
  412.                                      r  Recursive expansion of dirs (a/u)
  413.  
  414. The environment variable TMPDIR may be set to specify the directory used for
  415. creating temporary files while archiving
  416.  
  417. --------------------------------------------------------------------
  418.  
  419.