Ticket #15302: lha.1.r889

File lha.1.r889, 11.4 KB (added by takanori@…, 16 years ago)
Line 
1.\" -*- indent-tabs-mode: nil -*-
2.\"
3.\" Copyright (c) 2008 Koji Arai
4.\"
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:
12.\"
13.\" The above copyright notice and this permission notice shall be
14.\" included in all copies or substantial portions of the Software.
15.\"
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
23.\" SOFTWARE.
24
25.TH LHA "1" "February 2008" "LHa for UNIX" "User Commands"
26
27.SH NAME
28LHa for UNIX \- Traditional compressor and archiver.
29
30.SH SYNOPSIS
31
32lha
33[\-]\fIcommand\fR[\fIoptions\fR] [\-\fIoptions\fR ...]
34archive_file.lzh
35[files...]
36.TP
37.B Create an archive
38.nf
39lha c archive_file.lzh files or directories.
40.fi
41.TP
42.B Extract the archive
43.nf
44lha x archive_file.lzh [specific files]
45.fi
46.TP
47.B List the archive
48.nf
49lha l archive_file.lzh [specific files]
50\.fi
51or
52.nf
53lha archive_file.lzh [specific files]
54.fi
55.SH DESCRIPTION
56The LHa for UNIX is an archiver and compressor using the LZSS and the Huffman encoding compression algorithm.
57It is possible to create the archive file called the "LZH" file, and possible to extract it.
58
59It 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.
60
61.SH COMMANDS
62
63.TP
64\fB\-c\fR, \fB\-a\fR
65Specified files are compressed and archived into an archive file.
66When the directory path is specified, files under the directory are archived recursively.
67
68The \fB\-c\fR command creates new archive. When the archive file already exists, it is overwritten.
69The \fB\-a\fR command creates new archive or appends to existent archive.
70
71.TP
72\fB\-x\fR, \fB\-e\fR
73The \fB\-x\fR command extracts uncompressed files from the archive file.
74When the specific_files is specified, Only these files or directories are extracted.
75The \fB\-e\fR command is synonym of \fB\-x\fR.
76
77.TP
78\fB\-l\fR, \fB\-v\fR
79The \fB\-l\fR command lists the contents of archive to stdout. The \fB\-v\fR command is more verbosely command.
80The term of list is below.
81.RS
82.TP
83PERMISSION
84For the Unix specific archive, it is permission string like \fBls\fR(1).
85For the others, it is the string of OS type.
86.TP
87UID/GID
88For the Unix specific archive, it is user-id and group-id.
89For the others, it is space only.
90.TP
91PACKED
92The size of compressed file. it is shown by the \fB\-v\fR command.
93.TP
94SIZE
95The original file size.
96.TP
97RATIO
98Compressed ratio (PACKED / SIZE * 100).
99.TP
100METHOD
101The string of the compressing method.  it is shown by the \fB\-v\fR command.
102.RS
103.TP
104\-lh0\-
105no compressed.
106.TP
107\-lzs\-
1082k sliding dictionary (created by the LArc)
109.TP
110\-lz4\-
111no compressed. (created by the LArc)
112.TP
113\-lz5\-
1144k sliding dictionary (created by the LArc)
115.TP
116\-lh1\-
1174k sliding dictionary and dynamic Huffman encoding.
118.TP
119\-lh2\-
1208k sliding dictionary and dynamic Huffman encoding.
121.TP
122\-lh3\-
1238k sliding dictionary and static Huffman encoding.
124.TP
125\-lh4\-
1264k sliding dictionary and static Huffman encoding.
127.TP
128\-lh5\-
1298k sliding dictionary and static Huffman encoding.
130.TP
131\-lh6\-
13232k sliding dictionary and static Huffman encoding.
133.TP
134\-lh7\-
13564k sliding dictionary and static Huffman encoding.
136.TP
137\-lhd\- directory
138
139.RE
140The LHa for Unix is able to create the methods \-lh0\-, \-lh1\-, \-lh5\-, \-lh6\-, \-lh7\- and \-lhd\-.
141
142.TP
143CRC
144The CRC-16 code. It is shown by the \fB\-v\fR command.
145
146.TP
147STAMP
148The timestamp of the file. It is shown the full-time format with the \fB\-v\fR option.
149
150.TP
151LV
152The header level. It is shown by the \fB\-v\fR option.
153
154The level 0 and 1 are deprecated. The level 2 header is widely used.
155The level 3 header is more improved, however, it is rarely used.
156
157The LHa for Unix is able to create the 0, 1 and 2. (Level 3 is readable.)
158
159.TP
160NAME
161Filename or directory name.
162.RE
163
164.TP
165\fB\-u\fR
166The \fB\-u\fR command updates the archive. When the specified files are newer than the content of the archive, they are replaced.
167The \fB\-a\fR command always replace with the specified files.
168
169.TP
170\fB\-m\fR
171The \fB\-m\fR command moves specified files into the archive.
172It is same as the \fB\-ad\fR (\fB\-a\fR command and \fB\-d\fR option).
173
174.TP
175\fB\-d\fR
176The \fB\-d\fR command delete the specified files from the archive.
177
178.TP
179\fB\-p\fR
180The \fB\-p\fR command print the content of the archived files to stdout.
181Each contents are printed with filename as header string like below.
182
183    ::::::::
184    filename
185    ::::::::
186    contents of the file.....
187
188If you wish to non-display the header string, use with the \fB\-q\fR option.
189
190.TP
191\fB\-t\fR
192The \fB\-t\fR command is the same as the \fB\-x\fR command except to non-extract actually.
193This command is used to check the archive file.
194
195.SH OPTIONS
196
197.TP
198\fB\-q\fR[\fInum\fR]
199The \fB\-q\fR option specifies the level of quiet mode. \fInum\fR is 0, 1, 2 or nothing.
200
201The \fB\-q\fR0 option is default level.
202The \fB\-q\fR1 option inhibits the extracting indicator (progress bar).
203The \fB\-q\fR2 option inhibits other output decoration. this option has the effects of the \fB\-f\fR option.
204The \fB\-q\fR is same as \fB\-q\fR2.
205
206.TP
207\fB\-v\fR
208When listing with the \fB\-l\fR or the \fB\-v\fR command, the \fB\-v\fR option lists more verbosely.
209
210Elements 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.
211
212In special case, the \fB\-v\fR command trailing two \fB\-v\fR options like,
213lha vvv archive_file.lzh
214shows the header dump. This is a debugging feature.
215
216.TP
217\fB\-n\fR
218The \fB\-n\fR option displays the message instead of doing the command action.
219
220.TP
221\fB\-f\fR
222Force extraction. When extracted file already exists,
223normally, lha asks for the Overwriting, or Skipping or All files skipping.
224This option forces overwrite without asking.
225
226.TP
227\fB\-t\fR
228The \fB\-t\fR option treats archiving or extracting files as text files.
229When extracting, CR codes on the end of each lines are removed. (convert DOS format text to UNIX format text)
230When archiving, oppositely, CR codes append on the end of each lines. (convert UNIX format text to DOS format text)
231With the \fB\-e\fR option, KANJI code are converted as well.
232
233.TP
234\fB\-o\fR[5\-7]
235When archiving, the \fB\-o\fR option specifies the compressing method.
236the \fB\-o\fR5 means to use the \-lh5\- method. It is widely used and default method.
237the \fB\-o\fR6 and \fB\-o\fR7 means to use the \-lh6\- and \-lh7\- method.
238These methods reduced archive file more than the \-lh5\- method.
239Just the \fB\-o\fR means to use the \-lh1\- method.
240
241It is possible to include some methods in an archive file.
242
243.TP
244\fB\-d\fR
245When archiving, specified files are removed from the disk.
246
247.TP
248\fB\-i\fR
249When extracting, ignore the directory path. extracting file is put flatten on the current directory.
250
251.TP
252\fB\-z\fR
253When archiving, do not compress the specified file. (archive with the \-lh0\- method)
254
255.TP
256\fB\-g\fR
257When extracting, this option does nothing. It exists for historical reason.
258
259When archiving with this option, archive with general (obsolete) header format.
260It 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.
261
262.TP
263\fB\-0\fR, \fB\-1\fR, \fB\-2\fR
264The \-0, \-1 and \-2 option specifies the version of the format header (called the header level).
265
266.TP
267\fB\-e\fR
268When archiving, the \fB\-e\fR option regard the coding of text as EUC-JP and convert it to Shift_JIS.
269When extracting, convert from Shift_JIS to EUC-JP.
270
271.TP
272\fB\-b\fR
273When extracting, If it is possible, the MacBinary is interpreted.
274This option is experimental.
275
276.TP
277\fB\-w\fR=\fIdir\fR
278When extracting, extract files are create in the \fIdir\fR directory.
279
280An equal mark is omittable like, \-w dir.
281
282.TP
283\fB\-x\fR=\fIpattern\fR
284When archiving, exclude files matched the glob pattern \fIpattern\fR.
285It is possible to use this option anywhere in the command line.
286
287An equal mark is omittable like, \-x pattern.
288
289.SH LONG OPTIONS
290
291.TP
292\fB\-\-archive\-kanji\-code\fR={euc,sjis,utf8,cap,none}
293Specifies the multi-byte encoding of the archived pathname.
294
295Default is sjis as Shift_JIS.
296
297On LZH file, the encoding of pathname in archive is not ruled.
298However, In Japan, Shift_JIS (exactly Windows-31J) is defacto standard.
299
300.TP
301\fB\-\-system\-kanji\-code\fR={euc,sjis,utf8,cap,none}
302This option specifies the encoding of the pathname on the filesystem.
303Default is euc as EUC-JP.
304
305.TP
306\fB\-\-extract\-broken\-archive\fR
307If CRC error occurrs when extracting, and its archive is created by old version of LHa for UNIX, this option may be last resort.
308
309.TP
310\fB\-\-convert\-filename\-case\fR
311When extracting, the archive format is MS-DOS or Generic, and the
312whole filename (and directory name) is uppercase, extracted
313filename will be in lowercase.
314
315It was default behavior on the old version of the LHa for UNIX.
316However, many software create the LZH archive with case-sensitive filename even if it is a MS-DOS type archive.
317Therefore, its behavior was deprecated as default.
318
319.TP
320\fB\-\-ignore\-mac\-files\fR
321When archiving, the Mac specific files are ignored.
322
323This option is same as the `\fB\-x\fR "._*" \fB\-x\fR ".DS_Store" \fB\-x\fR "Icon\\r"'.
324
325.TP
326\fB\-\-traditional\fR
327Turn on the compatible mode for the old version.
328For now, same as the \fB\-\-convert\-filename\-case\fR.
329
330.TP
331\fB\-\-help\fR
332Show the briefly usage.
333
334.TP
335\fB\-\-version\fR
336Show the version string.
337
338.SH SEE ALSO
339\fBzip\fR(1), \fBunzip\fR(1), \fBgzip\fR(1), \fBgunzip\fR(1), \fBzcat\fR(1)
340
341.SH AUTHOR
342Koji Arai <arai@users.sourceforge.jp>
343
344.SH HISTORY
345In 1988, Haruhiko Okumura developed the LZARI. It was experimental implementation used the LZSS and the arithmetic coding.
346
347Kazuhiko Miki developed the LArc. (it was used the \-lzs\- method)
348
349Haruyasu Yoshizaki developed the LZHUFF (it was experimental code with the LZSS and the Huffman coding), and developed the LHarc version 1.00.
350
351In 1989, the LHarc was ported on UNIX by Yoichi Tagawa.
352
353Haruhiko Okumura and Haruyasu Yoshizaki improved the algorithm of the LHarc.
354
355In 1990, the LHx 2.00 which is the LHarc improvement was implemented by Haruyasu Yoshizaki.
356The ar002 was implemented by Haruhiko Okumura. It is distributed as the Public Domain Software.
357
358In 1991, Haruyasu Yoshizaki improved the LHx and renamed to the LHa, and renamed again to the LHA.
359
360In Japan, This version (LHA 2.10 - 2.13) was widely used on MS-DOS and MS-Windows.
361Many software and many documents are distributed with this archive format.
362
363In 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.
364
365The 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.
366
367However, its license is vague. so it is not recognized as the Open Source Software defined by the Open Source Initiative.