home *** CD-ROM | disk | FTP | other *** search
/ rtsi.com / 2014.01.www.rtsi.com.tar / www.rtsi.com / OS9 / OSK / ARCHIVERS / lharc1.03.doc < prev    next >
Text File  |  2009-11-06  |  12KB  |  354 lines

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