tldr/pages/common/xz.md

37 lines
710 B
Markdown
Raw Normal View History

2016-01-28 20:42:05 +00:00
# xz
> Compress or decompress `.xz` and `.lzma` files.
> More information: <https://manned.org/xz>.
2016-01-28 20:42:05 +00:00
- Compress a file using xz:
2016-01-28 20:42:05 +00:00
2022-12-04 09:12:49 +00:00
`xz {{path/to/file}}`
2016-01-28 20:42:05 +00:00
- Decompress an xz file:
2016-01-28 20:42:05 +00:00
`xz --decompress {{path/to/file.xz}}`
2016-01-28 20:42:05 +00:00
- Compress a file using lzma:
2019-04-15 01:24:14 +01:00
`xz --format=lzma {{path/to/file}}`
2019-04-15 01:24:14 +01:00
- Decompress an lzma file:
2019-04-15 01:24:14 +01:00
`xz --decompress --format=lzma {{path/to/file.lzma}}`
2019-04-15 01:24:14 +01:00
- Decompress a file and write to `stdout` (implies `--keep`):
2016-01-28 20:42:05 +00:00
`xz --decompress --stdout {{path/to/file.xz}}`
2016-01-28 20:42:05 +00:00
- Compress a file, but don't delete the original:
`xz --keep {{path/to/file}}`
2016-01-28 20:42:05 +00:00
2016-02-01 18:48:59 +00:00
- Compress a file using the fastest compression:
2016-01-28 20:42:05 +00:00
2022-12-04 09:12:49 +00:00
`xz -0 {{path/to/file}}`
2016-01-28 21:20:30 +00:00
2016-02-01 18:48:59 +00:00
- Compress a file using the best compression:
2016-01-28 21:20:30 +00:00
2022-12-04 09:12:49 +00:00
`xz -9 {{path/to/file}}`