1 .\" -*- indent-tabs-mode: nil -*-
3 .\" Copyright (c) 2008 Koji Arai
5 .\" Permission is hereby granted, free of charge, to any person
6 .\" obtaining a copy of this software and associated documentation files
7 .\" (the "Software"), to deal in the Software without restriction,
8 .\" including without limitation the rights to use, copy, modify, merge,
9 .\" publish, distribute, sublicense, and/or sell copies of the Software,
10 .\" and to permit persons to whom the Software is furnished to do so,
11 .\" subject to the following conditions:
13 .\" The above copyright notice and this permission notice shall be
14 .\" included in all copies or substantial portions of the Software.
16 .\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17 .\" EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18 .\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19 .\" NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
20 .\" BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
21 .\" ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
22 .\" CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
25 .TH LHA "1" "February 2008" "LHa for UNIX" "User Commands"
28 LHa for UNIX \- Traditional compressor and archiver.
33 [\-]\fIcommand\fR[\fIoptions\fR] [\-\fIoptions\fR ...]
39 lha c archive_file.lzh files or directories.
42 .B Extract the archive
44 lha x archive_file.lzh [specific files]
49 lha l archive_file.lzh [specific files]
53 lha archive_file.lzh [specific files]
56 The LHa for UNIX is an archiver and compressor using the LZSS and the Huffman encoding compression algorithm.
57 It is possible to create the archive file called the "LZH" file, and possible to extract it.
59 It is possible to extract the self-extracting archive file called the SFX file (mainly created on the MS-DOS and the MS-Windows), but impossible to create it.
65 Specified files are compressed and archived into an archive file.
66 When the directory path is specified, files under the directory are archived recursively.
68 The \fB\-c\fR command creates new archive. When the archive file already exists, it is overwritten.
69 The \fB\-a\fR command creates new archive or appends to existent archive.
73 The \fB\-x\fR command extracts uncompressed files from the archive file.
74 When the specific_files is specified, Only these files or directories are extracted.
75 The \fB\-e\fR command is synonym of \fB\-x\fR.
79 The \fB\-l\fR command lists the contents of archive to stdout. The \fB\-v\fR command is more verbosely command.
80 The term of list is below.
84 For the Unix specific archive, it is permission string like \fBls\fR(1).
85 For the others, it is the string of OS type.
88 For the Unix specific archive, it is user-id and group-id.
89 For the others, it is space only.
92 The size of compressed file. it is shown by the \fB\-v\fR command.
95 The original file size.
98 Compressed ratio (PACKED / SIZE * 100).
101 The string of the compressing method. it is shown by the \fB\-v\fR command.
108 2k sliding dictionary (created by the LArc)
111 no compressed. (created by the LArc)
114 4k sliding dictionary (created by the LArc)
117 4k sliding dictionary and dynamic Huffman encoding.
120 8k sliding dictionary and dynamic Huffman encoding.
123 8k sliding dictionary and static Huffman encoding.
126 4k sliding dictionary and static Huffman encoding.
129 8k sliding dictionary and static Huffman encoding.
132 32k sliding dictionary and static Huffman encoding.
135 64k sliding dictionary and static Huffman encoding.
140 The LHa for Unix is able to create the methods \-lh0\-, \-lh1\-, \-lh5\-, \-lh6\-, \-lh7\- and \-lhd\-.
144 The CRC-16 code. It is shown by the \fB\-v\fR command.
148 The timestamp of the file. It is shown the full-time format with the \fB\-v\fR option.
152 The header level. It is shown by the \fB\-v\fR option.
154 The level 0 and 1 are deprecated. The level 2 header is widely used.
155 The level 3 header is more improved, however, it is rarely used.
157 The LHa for Unix is able to create the 0, 1 and 2. (Level 3 is readable.)
161 Filename or directory name.
166 The \fB\-u\fR command updates the archive. When the specified files are newer than the content of the archive, they are replaced.
167 The \fB\-a\fR command always replace with the specified files.
171 The \fB\-m\fR command moves specified files into the archive.
172 It is same as the \fB\-ad\fR (\fB\-a\fR command and \fB\-d\fR option).
176 The \fB\-d\fR command delete the specified files from the archive.
180 The \fB\-p\fR command print the content of the archived files to stdout.
181 Each contents are printed with filename as header string like below.
186 contents of the file.....
188 If you wish to non-display the header string, use with the \fB\-q\fR option.
192 The \fB\-t\fR command is the same as the \fB\-x\fR command except to non-extract actually.
193 This command is used to check the archive file.
199 The \fB\-q\fR option specifies the level of quiet mode. \fInum\fR is 0, 1, 2 or nothing.
201 The \fB\-q\fR0 option is default level.
202 The \fB\-q\fR1 option inhibits the extracting indicator (progress bar).
203 The \fB\-q\fR2 option inhibits other output decoration. this option has the effects of the \fB\-f\fR option.
204 The \fB\-q\fR is same as \fB\-q\fR2.
208 When listing with the \fB\-l\fR or the \fB\-v\fR command, the \fB\-v\fR option lists more verbosely.
210 Elements are listed one file per two lines. The first line shows the filename, following line shows other elements and the timestamp (full-time format) and the header level.
212 In special case, the \fB\-v\fR command trailing two \fB\-v\fR options like,
213 lha vvv archive_file.lzh
214 shows the header dump. This is a debugging feature.
218 The \fB\-n\fR option displays the message instead of doing the command action.
222 Force extraction. When extracted file already exists,
223 normally, lha asks for the Overwriting, or Skipping or All files skipping.
224 This option forces overwrite without asking.
228 The \fB\-t\fR option treats archiving or extracting files as text files.
229 When extracting, CR codes on the end of each lines are removed. (convert DOS format text to UNIX format text)
230 When archiving, oppositely, CR codes append on the end of each lines. (convert UNIX format text to DOS format text)
231 With the \fB\-e\fR option, KANJI code are converted as well.
235 When archiving, the \fB\-o\fR option specifies the compressing method.
236 the \fB\-o\fR5 means to use the \-lh5\- method. It is widely used and default method.
237 the \fB\-o\fR6 and \fB\-o\fR7 means to use the \-lh6\- and \-lh7\- method.
238 These methods reduced archive file more than the \-lh5\- method.
239 Just the \fB\-o\fR means to use the \-lh1\- method.
241 It is possible to include some methods in an archive file.
245 When archiving, specified files are removed from the disk.
249 When extracting, ignore the directory path. extracting file is put flatten on the current directory.
253 When archiving, do not compress the specified file. (archive with the \-lh0\- method)
257 When extracting, this option does nothing. It exists for historical reason.
259 When archiving with this option, archive with general (obsolete) header format.
260 It uses the level 0 header, filename is uppercased in the archive,Unix specific elements such as permission, user-id and so on are not saved.
263 \fB\-0\fR, \fB\-1\fR, \fB\-2\fR
264 The \-0, \-1 and \-2 option specifies the version of the format header (called the header level).
268 When archiving, the \fB\-e\fR option regard the coding of text as EUC-JP and convert it to Shift_JIS.
269 When extracting, convert from Shift_JIS to EUC-JP.
273 When extracting, If it is possible, the MacBinary is interpreted.
274 This option is experimental.
278 When extracting, extract files are create in the \fIdir\fR directory.
280 An equal mark is omittable like, \-w dir.
283 \fB\-x\fR=\fIpattern\fR
284 When archiving, exclude files matched the glob pattern \fIpattern\fR.
285 It is possible to use this option anywhere in the command line.
287 An equal mark is omittable like, \-x pattern.
292 \fB\-\-archive\-kanji\-code\fR={euc,sjis,utf8,cap,none}
293 Specifies the multi-byte encoding of the archived pathname.
295 Default is sjis as Shift_JIS.
297 On LZH file, the encoding of pathname in archive is not ruled.
298 However, In Japan, Shift_JIS (exactly Windows-31J) is defacto standard.
301 \fB\-\-system\-kanji\-code\fR={euc,sjis,utf8,cap,none}
302 This option specifies the encoding of the pathname on the filesystem.
303 Default is euc as EUC-JP.
306 \fB\-\-extract\-broken\-archive\fR
307 If CRC error occurrs when extracting, and its archive is created by old version of LHa for UNIX, this option may be last resort.
310 \fB\-\-convert\-filename\-case\fR
311 When extracting, the archive format is MS-DOS or Generic, and the
312 whole filename (and directory name) is uppercase, extracted
313 filename will be in lowercase.
315 It was default behavior on the old version of the LHa for UNIX.
316 However, many software create the LZH archive with case-sensitive filename even if it is a MS-DOS type archive.
317 Therefore, its behavior was deprecated as default.
320 \fB\-\-ignore\-mac\-files\fR
321 When archiving, the Mac specific files are ignored.
323 This option is same as the `\fB\-x\fR "._*" \fB\-x\fR ".DS_Store" \fB\-x\fR "Icon\\r"'.
326 \fB\-\-traditional\fR
327 Turn on the compatible mode for the old version.
328 For now, same as the \fB\-\-convert\-filename\-case\fR.
332 Show the briefly usage.
336 Show the version string.
339 \fBzip\fR(1), \fBunzip\fR(1), \fBgzip\fR(1), \fBgunzip\fR(1), \fBzcat\fR(1)
342 Koji Arai <arai@users.sourceforge.jp>
345 In 1988, Haruhiko Okumura developed the LZARI. It was experimental implementation used the LZSS and the arithmetic coding.
347 Kazuhiko Miki developed the LArc. (it was used the \-lzs\- method)
349 Haruyasu Yoshizaki developed the LZHUFF (it was experimental code with the LZSS and the Huffman coding), and developed the LHarc version 1.00.
351 In 1989, the LHarc was ported on UNIX by Yoichi Tagawa.
353 Haruhiko Okumura and Haruyasu Yoshizaki improved the algorithm of the LHarc.
355 In 1990, the LHx 2.00 which is the LHarc improvement was implemented by Haruyasu Yoshizaki.
356 The ar002 was implemented by Haruhiko Okumura. It is distributed as the Public Domain Software.
358 In 1991, Haruyasu Yoshizaki improved the LHx and renamed to the LHa, and renamed again to the LHA.
360 In Japan, This version (LHA 2.10 - 2.13) was widely used on MS-DOS and MS-Windows.
361 Many software and many documents are distributed with this archive format.
363 In 1992, It was ported on UNIX by Masaru Oki. It was called the LHa for UNIX, and it was improved by Nobutaka Watazaki, Tsugio Okamoto and many users.
365 The LHa for UNIX was used to exchange files for MS-DOS world, and its source codes might be used interestingly and implement another LZH archiver.
367 However, its license is vague. so it is not recognized as the Open Source Software defined by the Open Source Initiative.