------------------------------------------------------------------------ ------------------------------------------------------------------------ LHARC Vrs. 1.03 for OSK (OS9/68000) Compatible with version 1.13 of Lharc for MSDOS systems OSK port by Mike Haaland (CompuServe: 72300,1433) October 14, 1990 Last Updated: March 25, 1992 ------------------------------------------------------------------------ ------------------------------------------------------------------------ --- Introduction --- Lharc is an archive program such as Arc and Zoo. It can store several files in one archive in a compressed form which is generally more efficent than that used by Arc and Zoo. It also supplies all of the archive handling capabilities that an archive program should have. Another important feature of Lharc is its ability to preserve the file attributes. Its only weakness is compression speed: Zoo 2.0, for example, is faster, but if compression efficency is more important for you than compression time you'll surely appreciate this progam. (anyway decompression is much faster than compression) --- How to use --- Lharc is run from shell with the following command line: Lharc -[] [] items in square brackets are optional. can be any of the following (case is not significant): e,x extract files from archive Extracts files from archives. If you specify some file names or patterns only those files satisfying the patterns are extracted, otherwise all the files in the archive are extracted. While extracting files, Lharc checks if a file by the same name already exsists in the destination directory and prompts you before overwriting the old file with the extracted one (unless you specified the -f option) If the files have a path name stored in the archive, they are extracted with their path and needed directories are automatically created. l List archives contents Displays the names of the files in an archive along with their date, time, CRC, original length and compressed length. v Verbose list of archives contents Same as 'l', but will show extended header info and machine that the archive was created on. Moreover 'v' will also show all attributes etc. p extract and print files to screen same as 'e' and 'x', but extracted files are sent to stdout A print header is also shown and looks like: ::::::::::FILENAME:::::::::: This feature is included so when redirected to the printer, you know which file you printed. You may turn off the print header by using -pq (The'q' singifies quiet mode) a Add to existing archives or create a new archives Files are stored in alphabetical order. If you try to archive a file and a file by the same name already exists in the archive the file will not be added and a message will be printed on the screen to inform you. Also, by default file attributes are stored, use the 'g' option to create [GENERIC] format archives. m Move files into archive Same as add, but deletes original files after archiving them d Delete files from archives You can delete from an archive. u Update files in archives Same as with the 'a' command. However, if a file already exists in the archive, Lharc will check its time stamp and will keep the newer one and ignore the older one. c reConstruct an archive Replaces a file in the archive with the newer one only if a file with the same name already exists in the archive. Otherwise, no action is taken. is the name (eventually preceded by a path) of the archive you want to work on. If no extension is specified the default extension .LZH is used. [] represents an optional number of file names They indicate which files to extract/compress/list/delete, etc. Lharc is case sensitive, therefor while extracting files from an archive individually, the [] must match, exactly, the file names stored in the archive. When extracting you may specify a directory as a [] and all files and sub-directories that are stored in that directory will be extracted from the archive. For example, it the archive myfiles.lzh contained the following files: TEST/TEST1/filet1 TEST/TEST1/filet2 TEST/file1 TEST/file2 file and you wanted to extract all files in TEST/TEST1 only: lharc -x myfiles TEST/TEST1 This would extract TEST/TEST1/filet1 and TEST/TEST1/filet2 only. lharc -x myfiles TEST will extract the TEST directory, all files within it and also extract TEST/TEST1 and all it's files also. [] represents an optional number of switches that are used to change the behavior of the program. A switch is composed by a leading '-' followed by a command and then may immediatly followed by one or more options. Example: Lharc -pq archive.lzh readme.txt This tells Lharc to extract 'readme.txt' from 'archive.lzh' and print it to standard out, with no print header. You need not supply an option in the switch, but must supply a command. Here is a summary of the available options: v Verbose prints lots of neat info to let you know exactly what LHarc is doing. q Quiet mode Suppresses the display of what files are being processed during compression or decompression. Also inhibits the output of the print header during '-p' operations. f Force overwrite on EXtraction/Update modes Suppresses all the queries Lharc normally issues before overwriting existing files. g create GENERIC archive By default Lharc will stores and restores file descriptor info indicating creation date, last modification, and file attributes, in an extended header. This option will create archives compatible with the MSDOS version: in other words it will store files with an attribute bit pattern which is suitable for MSDOS machines while during extraction it will ignore the attributes stored in the archives, setting the attributes of the extracted files to the usual read and write attributes. If you do not use this switch, on the contrary, files will be stored with their original attributes and during extraction the stored attributed will be restored. Remember that, to effectively preserve file attributes, you must not use this switch during compression. Of course OSK file attributes are meaningless to MSDOS and vice-versa. t Text mode When using the 't' option. Lharc will attempt to change all CR/LF combinations to CR's during extraction and change CR's to CR/LF during compression. This is useful when you are extracting text files or source code. r Recursive expansion of directories This option, when used with the command '-a', will expand and archive any directories or sub-directories given as file arguments. Great for archiving entire disks. z read list of files from stdin an example would be to pipe the output of 'dir -u' or re- direct the input from a file having filenames 1 per line. Such as: dir -u ! lharc -az myfiles or lharc -az myfiles [] {[]} Function: Archive Management Utility Commands: a Add (or replace/create) to archive x,e EXtract from archive l,v List / Verbose List contents u Update newer files to archive d Delete file from archive m Move file to archive c re-Construct to a new archive p Print file from archive to stdout Options: q Quiet v Verbose n no execute (debugging option) f Force (overwrite at extract) t Text-mode (convert LFs to CRs) g Generate [generic] format .lzh files r Recursive expansion of dirs (use with -a) z read filenames from stdin The environment variable TEMPDIR may be set to specify the directory used for temporary files when archiving --------------------------------------------------------------------