Linux command
lzma 命令
文件
复制后可按需替换文件名、目录或参数。
常用示例
Compress file
lzma [file]
Decompress file
lzma -d [file.lzma]
Keep original file
lzma -k [file]
Compress to stdout
lzma -c [file] > [file.lzma]
Set compression level
lzma -9 [file]
List
lzma -l [file.lzma]
Test archive integrity
lzma -t [file.lzma]
说明
lzma compresses files using the Lempel-Ziv-Markov chain Algorithm. It provides high compression ratios at the cost of slower compression speed. The lzma command is typically a symlink to xz, which supports the legacy .lzma format alongside the newer .xz format.
参数
- -d, --decompress
- Decompress.
- -z, --compress
- Compress (default).
- -k, --keep
- Keep original files.
- -c, --stdout
- Write to stdout.
- -1 to -9
- Compression level.
- -e, --extreme
- Maximum compression.
- -t, --test
- Test integrity.
- -f, --force
- Force overwrite.
- -v, --verbose
- Verbose mode; show compression ratio and other details.
- -q, --quiet
- Suppress warnings; specify twice to suppress errors too.
- -l, --list
- List information about compressed files.
- -T, --threads _NUM_
- Set number of worker threads (0 for auto-detect based on CPU cores).
FAQ
What is the lzma command used for?
lzma compresses files using the Lempel-Ziv-Markov chain Algorithm. It provides high compression ratios at the cost of slower compression speed. The lzma command is typically a symlink to xz, which supports the legacy .lzma format alongside the newer .xz format.
How do I run a basic lzma example?
Run `lzma [file]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -d, --decompress do in lzma?
Decompress.