1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-29 23:24:55 +02:00
tldr/pages/common/xz.md
Sebastiaan Speck 1b5bdce9a2
xz: write format as part of command (#11936)
Co-authored-by: K.B.Dharun Krishna <kbdharunkrishna@gmail.com>
2023-12-30 18:34:23 +01:00

36 lines
710 B
Markdown

# xz
> Compress or decompress `.xz` and `.lzma` files.
> More information: <https://manned.org/xz>.
- Compress a file using xz:
`xz {{path/to/file}}`
- Decompress an xz file:
`xz --decompress {{path/to/file.xz}}`
- Compress a file using lzma:
`xz --format=lzma {{path/to/file}}`
- Decompress an lzma file:
`xz --decompress --format=lzma {{path/to/file.lzma}}`
- Decompress a file and write to `stdout` (implies `--keep`):
`xz --decompress --stdout {{path/to/file.xz}}`
- Compress a file, but don't delete the original:
`xz --keep {{path/to/file}}`
- Compress a file using the fastest compression:
`xz -0 {{path/to/file}}`
- Compress a file using the best compression:
`xz -9 {{path/to/file}}`