📄 lha255.txt
字号:
-x1 option lists directory names with files names.
-p[0|1] Distinguish files by Path names
When -p1 is specified as a file extraction option, files
with a same name in different paths are distinguished.
When a numerical is omitted after the 'p', 1 is assumed.
If files stat.h and tc\include\sys\stat.h is compressed
to an archive file, TC.LZH:
LHA e TC.LZH stat.h
tries to extracts both file stat.h and file
tc\include\sys\stat.h to the current directory.
(Only the one most recently modified file is
extracted.)
LHA e -p TC.LZH stat.h
extracts only the stat.h file without the path
name in the current directory.
LHA e TC.LZH sys\stat.h
extracts only the file stat.h file in the
tc\include\sys\ directory to the current
directory.
-c[0|1] (ignore file modification day/time)
When -c1 is specified with 'u', 'f', 'e', or 'x' command,
file modification time check is not executed. This
option may be used to restore the old copy of a file
from the archive file.
When a numerical is omitted after the 'c', 1 is assumed.
-m[0|1|2] (do not display query Messages)
When -m1 or -m2 is specified as an option, all query
messages (eg. Overwrite? [Y/N]) are answered with a
Y(es).
-m1 and -m2 differs in the following ways when extracting
files from an archive:
-m1 Overwrite a file only when last modification
date/time of archive file is more recent.
-m2 Extract all files regardless of modification date.
Affix consecutive number from 000 to 999 as file
extension when file with the same already exists.
-a[0|1|2] (ignore file Attributes)
When -a1 or -a2 is specified, file attribute is ignored
when compressing files (ie. system and hidden files are
also compressed) and file attributes are preserved when
extracting files from an archive file.
Compression:
-a0 (default setting)
System and hidden files are not compressed to an
archive file. However, files with read-only
attribute are compressed with their attribute
intact in the archive file.
-a1 Compress all files with their attributes
-a2 Compress all files with their attributes but also
keep directory name when specified with -r2x1
option (same as -d1 option). Directory name is
listed with -lhd- attribute when archive is listed.
Extraction:
-a0 System and hidden files are not extracted from the
archive file. Read-only files are extracted, but
files attributes will not be preserved.
-a1 All files are extracted with their attributes
intact.
-r[0|1|2] (Recurse operation)
When -r1 or -r2 is specified, a command is executed
recursively in specified subdirectories.
-r0 Do not search sub-directories. (default option)
-r1 File name specification mode
Path name is extracted from the FILE name, and
command is executed recursively in its
subdirectories. Used to apply command all files
with matching files names in different directories.
-r2 Directory specification mode
Apply command recursively to all files in a
specified directory and its subdirectories.
WARNING: LHarc actually replaced -r with -x when
extracting files. However, LHA treats -x
and -r differently. Be sure to use the proper
option.
< Example 15 > LHA a -r1 source.lzh \source.c \source\*.h
Compress files with extensions C and H from directory
\SOURCE and all its subdirectories.
< Example 16 > LHA a -r2x1 a:\*.*
Compress all files in drive A and all files in its
subdirectories with their directories intact.
Frequently Asked Questions
(1) How do I backup disk A: ?
LHA a /r2x1 temp a:\
where temp is the name of the archive file
(2) How do I extract all directories and files to drive b:?
LHA x arc.lzh b:\
where ARC.LZH is the name of the archive file.
-w[0|1|<Directory name>] (assign Working directory)
Specify directory where temporary files are created.
When -w is followed by a directory name, temporary files
are created in the specified directory. If only -w1 is
specified without a directory, temporary files are created
in the current directory.
When -w option is entirely omitted, temporary files are
created in the same directory as the archive file and this
temporary file is renamed to an archive file name at the
end of the operation.
Additionally, when environmental parameters TMP or TEMP is
set, the specified directory is used.
'w' option may be benefitial in the following situations:
1. When there are not enough free space in the
directory (drive) where the archive file resides.
2. To speed operations by creating temporary files on
devices with faster I/O access time such as RAM
disk or hard disk instead of fds.
< Example 17 > LHA a -wd:\ arc.lzh *.*
Create temporary files on drive D: to compress all files
in the current directory to archive file ARC.LZH.
-t[0|1] (update Time stamp)
When -t1 is specified, modification date and time of the
archive file is set to the most recent date/time of files
contained in the archive.
When -t0 (default) is specified, modification date/time
of the archive file is set to date/time when the archive
file was created or modified.
-z[0|1|2] (Zero compress file to archive)
When -z1 or -z2 is specified, files are archived to an
archive file without being compressed.
-z1 Do not compress all files that are to be archived.
-z2 Do not compress files with extension ARC, LZH, LZS,
PAK, ZIP, and ZOO. Compress other files.
-z3<extension>
Beside files with extension specified with -z2
options, do not compress files with extension
<extension>.
Wildcard characters '*' and '?' may be used to
specify <extension>. (Refer to section F for
further information on wild card characters.)
Extension separator '.' is ignored. It may be
included in <extension> or excluded.
To specify files without any extension, specify
'-z.' as an option.
Multiple extensions may be specified by
sequentially defining extensions to be
uncompressed.
(eg. -zexe -zcom)
< Example 18 > LHA a -zcom -zexe archive.lzh *.*
Archive all files in the current drive to file
ARCHIVE.LZH but do not compress files with extension COM
and EXE.
-o[0|1] (use Old compression algorithm)
When -o1 is specified, files are compressed in an format
that can be extracted using LHarc ver1.xx. -h0 option
is automatically specified when -o1 is specified.
Using this option with LHA creates archive file that is
more compressed than using LHarc.
-h[0|1|2] (select Header format)
Select header format of the archive file. The default
setting is -h1.
-i[0|1] (do not Ignore case)
When -i1 is specified, file(s) specified by FILE are
treated case sensitivity.
Some OSs are case sensitive to file names. Thus, files
contained in an archive file may contain files names with
upper and lower case characters. Use -i1 option to
extract files from these archives.
NOTE: File names of files archieved from MS-DOS are all
converted to upper case letters.
a. When manipulating files in an archive file
(commands f, d, s, e, x, t, p, l, v)
-i0 Do not distinguish between upper and lower case
file names.
-i1, -i2
Distinguish between upper and lower case file
names.
b. When compressing files to an archive file
(commands a, u, m)
-i0 Convert all file names to upper case letters.
-i1 Convert all file names with wild card characters
('*' and '?') to upper case letters.
-i2 Convert all file names with wild card characters
('*' and '?') to lower case letters.
(Refer to section F for further information on wild
card characters.)
-n[0|1|2] (do Not display progress report)
When -n1 or -n2 is specified, file compress/extraction
progress are not displayed.
-n0 Display progress report.
-n1 Do not display ooo..... progress report.
-n2 Do not display ooo..... progress report and
file names.
-l[0|1|2] (display Long file name)
When -l1 or -l2 is specified, path name is displayed with
file name.
-l0 Display only file name.
-l1 Display path name to be/save in archive file with
file name. Used to display where in the archive
file the file is being archived.
-l2 Display path name of accessed file name with file
name. Used to display where the files being
archived is located.
Note:When -l1 or -l2 is specified, each file is displayed
in 2 rows.
< Example 19 > LHA a -r1x1l2 link.lzh c:\link.*
Archives all files named 'link.' in all directories
below C:\ and display path name of file being archived
with the file name.
--[0|1|2] (allow file name starting with option switch indicator)
When --1 or --2 is specified, file name may start with
a LHA option switch indicator, '-' and '@'.
(Refer to Section E for information on file starting with
'@'.)
/-0 Do not allow file name to start with '-' and '@'
-l1 Allow file name to start with '@'.
-l2 Allow file name to start with '@' and '-'.
WARNING: Do not use --0. LHA will mistake it for a
file name.
-s[0|1] (Do not display Skipped file message)
When -s1 is specified, 'Skipped <Filename>' message is
not displayed. LHA by default displays a skipped message
and do not archive/extract files if a file with the same
name but with more recent modification date already
exist.
-s0 Display skipped file message.
-s1 Do not display skipped file message. Used when LHA
is executed from a batch file.
-d[0|1] (save Directory name)
When -d1 is specified, all files (including system and
hidden files) and all files in all subdirectories are
archived.
NOTE: Same as specifying -r2x1a2 option.
-f[0|1] (Forcefully write files without checking free disk space)
When -f1 is specified, files are archived/extracted
without first checking for free disk space.
Specify this switch when an error occurs executing LHA
on some networked computers.
D. Base Directory
==================
Base directory may be specified to compress files from and to
extract files to several different directories.
Base directory may be specified instead of moving to another drive
and directory to archive/extract files. Furthermore, several
different directories may be specified in one statement.
NOTE: When fd drive (eg. A:) is specified, LHA uses the current
drive. (Current drive may be displayed by changing to the
drive.)
< Example 20 >
A>LHA x program c:\bin\ *.exe *.com c:\temp\ *.man *.doc
~~~~~~~ ~~~~~~~~
The above statement is equivalent to executing the following
set of commands:
A>C:
C>CD \BIN
C>LHA x d:\program *.com *.exe
C>cd \temp
C>LHA x d:\program *.man *.doc
To extract a single file to several directories, it is necessary
repeatly extracted to each directory.
WARNING: When several extract to directories are specified to
extract a single file, the file is only extracted to the
first specified directory.
E. MS-DOS Redirection and Batch File
=====================================
MS-DOS file redirection and pipes and LHA batch file are used to
compress/extract many files.
MS-DOS restricts number of characters on a single command line.
This restriction limits length of a LHA command disallowing many
files to be compressed/extracted with a single command.
a. Batch File
Batch files contains command, options, and parameters to be
executed.
1. Batch files name are refered by prefixing the file name with
with a character '@'.
2. A command may extend across multiple lines. A carriage return
is replaced with a space when batch file is executed.
WARNING: Batch file may not be called from within another batch
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -