Latest web development tutorials

Linux lha command

Linux command Daquan Linux command Daquan

Linux lha command is used to compress or decompress files.

lha lharc evolved from a compression program, the file after it is compressed, it will generate additional compressed files have ".lzh" extension.

grammar

lha [-acdfglmnpqtuvx][-a <0/1/2>/u</0/1/2>][-<a/c/u>d][-<e/x>i][-<a/u>o][-<e/x>w=<目的目录>][-<a/u>z][压缩文件][文件...] 或 lha [-acdfglmnpqtuvx][-a <0/1/2>/u</0/1/2>][-<a/c/u>d][-<e/x>i][-<a/u>o][-<e/x>w=<目的目录>][-<a/u>z][压缩文件][目录...]

Parameters:

  • -a or a compressed file, and added to the archive.
  • -a <0/1/2> / u </ 0/1/2> compressed files with different file header.
  • After -c or c compressed files, reconstruct a new compressed file, and then added.
  • -d or d delete the specified file from within the compressed file.
  • - <a/c/u> D <a/c/u> d or compressed file, then added, reconstruct, update archive or delete the original file, which is the file to the compressed file.
  • -e or e unzip the file.
  • -f or f enforce lha command, when extracting a direct overwrite existing files without asking them.
  • g -g or use a common compression format, easy to solve the compatibility problem.
  • - When <e / x> i or <e / x> i unlock the compressed file, save the file path is ignored in the compressed file, unpacked directly deposited in their current directory or the specified directory.
  • -l or l lists information about compressed files.
  • -m M or effect of this parameter and specify "-ad" the same parameters.
  • -n or n instruction is not executed, the actual implementation of the action will be listed only carried out.
  • - <a/u> O or <a/u> o use lharc compatible format, the compressed file is added to update the compressed file.
  • -p or p output from the compressed file to the standard output device.
  • -q or q is not displayed during the execution of instructions.
  • -t or t check each file within the backup file is correct.
  • -u or u replace the newer files to the compressed file.
  • -u </ 0/1/2> or u </ 0/1/2> different file header when the file is compressed into a zip file and then update.
  • -v or v archive information detailing.
  • - <E / x> w = <destination directory> or <e / x> w = <destination directory> Specifies unzipped.
  • -x or x unzip the file.
  • - <a/u> Z or <a/u> z does not compress files, add it directly to update the archive.

Examples

Shrink files

# lha -a abc.lhz a.b //压缩a.b文件,压缩后生成 abc.lhz文件

Compression directory

# lha -a abc2 /home/hnlinux

Unzip the file to the current directory

# lha -xiw=agis abc  //解压文件abc

Linux command Daquan Linux command Daquan