Compress or decompress lzh format files
lha command is a compression program evolved from lharc. After the file is compressed by it, a compressed file with an extension of .lzh
will be generated.
-a or a: Compress the file and add it to the compressed file.
-a<0/1/2>/u</0/1/2> When compressing files, use different file headers.
-c or c: Compress the file, reconstruct the new compressed file, and then add it.
-d or d: Delete the specified file from the compressed file.
-<a/c/u>d or <a/c/u>d: compress the file and then add it, reconstruct it, update the compressed file or delete the original file, that is, move the file to the compressed file.
-e or e: Unzip the compressed file.
-f or f: Force the execution of the lha command, which will directly overwrite existing files without asking when decompressing.
-g or g: Use a common compression format to facilitate solving compatibility issues.
-<e/x>i or <e/x>i: When decompressing a compressed file, ignore the file path saved in the compressed file, decompress it directly and store it in the current directory or the specified directory.
-l or l: List information about compressed files.
-m or m: The effect of this option is the same as specifying the "-ad" option at the same time.
-n or n: Do not execute the instruction, only list the actions that will be performed during the actual execution.
-<a/u>o or <a/u>o: Use lharc compatible format, add the compressed file, and update the compressed file.
-p or p: Output from the compressed file to the standard output device.
-q or q: Do not display the instruction execution process.
-t or t: Check whether each file in the backup file is correct.
-u or u: Replace newer files into the compressed file.
-u</0/1/2> or u</0/1/2>: Use different file headers when compressing files, and then update them into the compressed files.
-v or v: List the relevant information of the compressed file in detail.
-<e/x>w=<destination directory> or <e/x>w=<destination directory>: Specify the decompression directory.
-x or x: Unzip the compressed file.
-<a/u>z or <a/u>z: Do not compress the file, add it directly, and update the compressed file.
lha -a abc.lhz a.b #Compress the a.b file and generate abc.lhz file after compression
lha -a abc2 /home/hnlinux #Compress directory
lha -xiw=agis abc #Extract file abc to the current directory