home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
rtsi.com
/
2014.01.www.rtsi.com.tar
/
www.rtsi.com
/
OS9
/
OSK
/
ARCHIVERS
/
lha208.doc
< prev
next >
Wrap
Text File
|
2009-11-06
|
15KB
|
419 lines
------------------------------------------------------------------------
------------------------------------------------------------------------
LHa Vrs. 2.08
for OSK (OS9/68000)
Compatible with version 2.11 of Lha for MSDOS systems
OSK port by Mike Haaland (CompuServe: 72300,1433)
June 15, 1992
Last Updated: Dec. 2, 1994
------------------------------------------------------------------------
------------------------------------------------------------------------
--- Introduction ---
Lha 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 Lha 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 ---
Lha is run from shell with the following command line:
Lha -<command>[<options>] <Archive> [<file patterns>]
items in square brackets are optional.
<Command> 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, Lha 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, Lha 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.
t Test integrity of the archive
Allows making sure the archive is intact.
<Archive> 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.
[<file patterns>] represents an optional number of file names
They indicate which files to extract/compress/list/delete, etc.
Lha is case sensitive, therefor while extracting files from an
archive individually, the [<file pattern's'>] must match, exactly,
the file names stored in the archive. When extracting you may specify
a directory as a [<file pattern>] 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:
lha -x myfiles "TEST/TEST1/*"
This would extract TEST/TEST1/filet1 and TEST/TEST1/filet2 only.
lha -x myfiles "TEST/*"
will extract the TEST directory, all files within it and also extract
TEST/TEST1 and all it's files also.
[<options>] 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:
Lha -pq archive.lzh readme.txt
This tells Lha 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 LHa 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 Lha normally issues before
overwriting existing files.
g create GENERIC archive
By default Lha 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. Lha 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. This will, as of release
2.03, change LF's to CR's during extraction if the file contains
no only LF's. (IE: Amiga [generic] and UNIX text files)
r Recursive expansion of directories (used with -a/c/u)
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.
n Don't execute the command
Just show what LHa would do if the command was actually executed,
but don't actually create/extract the files.
d Delete files (used with -a/u/c)
Will delete the file after archiving it to the .lzh file.
i Ignore file paths (used with -e/x)
ignore any filepaths stored in the archive and extract the files
to the current working directory of the directory specified by
the -w option.
s Don't compress files (use with -a/u/c)
Store the files as-is. Don't attempt to compress them.
z get list of files to act on from standard input. Before
you could redirect stdin without this switch, this caused
problems when trying to run lha from a shell script.
o use LHarc compatible compression methods (used with -a/u/c)
This allows creation of .lzh files that the older LHarc's
can take apart.
0/1/2 Header level
Specify the header level to use when creating .lzh files.
w=<dir> allows extraction to <dir>
Handy when you don't want the to extract to the current working
directory.
c take apart .lzh files created with the first (broken) version
of LHarc for 6809/OS9. (used with -x/e/l/v)
--- Temporary files ---
While compressing files Lha creates a temporary file called
'LhXXXXXX' where XXXXXX is a hex digit representing the process ID.
This file is created in the current working directory. You may specify
a different directory to create the 'LHXXXXXX' file in by setting the
environment variable TMPDIR.
The reason for the XXXXXX part of the name is that if you run multiple
copies of Lha at the same time each copy will create its own temporary
file with a different name (usefull for multiuser systems for example).
Also, if adding files to an existing .LZH file, Lha will rename the
original .LZH file to file.bak. If file.bak already exists it will be
silently overwritten.
NOTE: rename no longer must be available for use by Lha.
--- Bugs ---
No known bugs at this time. If you find any, please notify me by any
means available to you.
--- FYI ---
If you supply only an archive name on the command line, LHa will use
the -l command on the archive and give you a listing of it's contents.
LHa can now read a 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 ! lha -az myfiles
or
lha -az myfiles <my_file_list
LHa will properly archive and extract directories. This is very handy
for source code, etc. For example:
dir -u ! lha -arz stuff.lzh
or
lha -ar stuff.lzh *
will archive everything in the current directory, and all sub-directories
below it. Upon extraction, lha will create the sub-directories if they
do not exist.
If you are having difficulty with taking apart SelF-eXtracting archives,
try renaming the archive with the extension .exe or .com. Lha looks at
the file extention to determine if the archive is of the self-extracting
type.
LHarc OSK Version 1.0
Ported from the UNIX sources Vrs. 1.02 by Mike Haaland 10/14/1990
Vrs. 1.00 -
o Establishes an OSK extended header that allows saving file
descriptor info in archives created on an OSK machine, which,
when extracted on another OSK machine will be retained. All
other Machines will think the archive is in a "GENERIC" format
and will still be able to take apart the archive.
Vrs. 1.01 -
o Added display of storage method in the verbose -lv or -vv options.
o No longer requires 'cio' (OSK 2.2 would choke on the Makdir calls)
Vrs. 1.03 - module edition 14
o Added recursive directory archiving '-r' option.
o Also LHarc will now set the creation and modification dates to
match those in a [Generic] .lzh file upon extraction.
o Removed the 'rename' dependency.
o Changed Lharc to no longer accepts hardcode pathnames during
archiving. (IE: /dd/file) Only relative pathnames are allowed.
o Zero length filenames are now displayed when archiving and
during extraction if the 'v' option is used.
o The environment variable TMPDIR is checked, if it exists, all
temporary files used by Lharc will be created in that directory.
o Fixed LHarc to delete temporary file if no valid filenames are
given during -a 'add' command.
LHa Vrs. 2.01 - modules edition 2
o Now handles newer compression methods -lh5- -lhd- and -lh0-
LHa Vrs. 2.03 - Module edition 3
o Added EOL conversion of LF's to CR's during extraction while using
the 't' text option.
LHa Vrs. 2.04 - Module edition 4
o Fixed conversion of '\' to '/' in pathnames of GENERIC .lzh files
LHa Vrs. 2.05 - Module edition 5
o Changed the old 'z' flag to 's' for store (don't compress) files
o Added new 'z' flag to mean read list of files from standard in.
This allows LHa to be run from a shell script.
o Fixed creation of GENERIC .lzh files with full pathnames.
o Added extracting the ! filename in .exe and .sfx files as "telop"
LHa Vrs. 2.06 - Module edition 6
o Recognize OS-9(6809) archives, and use the attr when restoring them.
LHa Vrs. 2.07 - Module edition 7
o Added handling of OS-9(6809) archives, which incorrectly flag
level 0 archives as level 1. (Yuck!)
LHa Vrs. 2.08 - Module edition 8
o Removed the handling of OS-9(6809) archives, because new OS-9(6809)
archives now genetate correct headers.
o Added 'c' option to handle old OS-9(6809) archives, which incorrectly
flagged level 0 archives as level 1. (Yuck!)
--- Compatibility ---
This program is aimed at full compatibility with the MSDOS version
2.13 of Lha and UNIX version 2.00.
As noted above, LHa will now, unfreeze LHA archives.
--- Acknowledgements ---
First of all I give credit to Haruyasu Yoshizaki for devising such an
efficent compression algorythm as LZHUF.
And Y. Tagawa, who did the UNIX port of Lharc, which is what the OSK
version is based upon.
Also to Paolo Zibette - Fidonet 2:331/101.6 - who wrote the Amiga
version of Lharc and documented the features in english. (Without
his docs as a starting point, you'd still have none!!!) ;-)
--- How to Reach Me ---
I may be reached the following ways:
Phone (Voice) : (303) 730-1292
CompuServe : 72300,1433
Internet : mikeh@vkgs.com
US Mail : 5116 S. Delaware #C-216, Englewook, CO. 80110 U.S.A.
Mike Haaland
--------------------------------------------------------------------
This is the output of lha -?
LHa Vrs. 2.08 for OSK - revised Dec. 2, 1994 M.Haaland
Syntax: LHa -{axelvudmcp}[qvnfodiszgc012][w=<dir>] archive_file [file...]
Function: Archive Management Utility
Commands: Options:
a Add (create/replace) to archive q quiet
x,e EXtract from archive v verbose
l,v List / Verbose List n not execute
u Update newer files to archive f force (over write at extract)
d Delete from archive t FILES are TEXT file
m Move to archive (means 'ad') o use LHarc compatible method (a/u)
c re-Construct new archive w=<dir> specify extract directory (x/e)
p Print to STDOUT from archive d delete FILES after (a/u/c)
t Test file CRC in archive i ignore directory path (x/e)
g [Generic] format (for compatiblity)
0/1/2 header level (a/u)
c bad CoCo OS-9 archive (x/l)
s store - don't compress files (a/u)
z get list of file from standard input
r Recursive expansion of dirs (a/u)
The environment variable TMPDIR may be set to specify the directory used for
creating temporary files while archiving
--------------------------------------------------------------------