2016-01-28 15:42:05 -05:00
|
|
|
# xz
|
|
|
|
|
2024-03-14 02:01:06 -03:00
|
|
|
> Compress or decompress XZ and LZMA files.
|
2023-07-16 08:00:03 +02:00
|
|
|
> More information: <https://manned.org/xz>.
|
2016-01-28 15:42:05 -05:00
|
|
|
|
2023-07-16 08:00:03 +02:00
|
|
|
- Compress a file using xz:
|
2016-01-28 15:42:05 -05:00
|
|
|
|
2022-12-04 10:12:49 +01:00
|
|
|
`xz {{path/to/file}}`
|
2016-01-28 15:42:05 -05:00
|
|
|
|
2024-03-14 02:01:06 -03:00
|
|
|
- Decompress an XZ file:
|
2016-01-28 15:42:05 -05:00
|
|
|
|
2025-06-07 15:04:29 +03:00
|
|
|
`xz {{[-d|--decompress]}} {{path/to/file.xz}}`
|
2016-01-28 15:42:05 -05:00
|
|
|
|
2023-07-16 08:00:03 +02:00
|
|
|
- Compress a file using lzma:
|
2019-04-14 21:24:14 -03:00
|
|
|
|
2025-06-07 15:04:29 +03:00
|
|
|
`xz {{[-F|--format]}} lzma {{path/to/file}}`
|
2019-04-14 21:24:14 -03:00
|
|
|
|
2024-03-14 02:01:06 -03:00
|
|
|
- Decompress an LZMA file:
|
2019-04-14 21:24:14 -03:00
|
|
|
|
2025-06-07 15:04:29 +03:00
|
|
|
`xz {{[-d|--decompress]}} {{[-F|--format]}} lzma {{path/to/file.lzma}}`
|
2019-04-14 21:24:14 -03:00
|
|
|
|
2023-07-16 08:00:03 +02:00
|
|
|
- Decompress a file and write to `stdout` (implies `--keep`):
|
2016-01-28 15:42:05 -05:00
|
|
|
|
2025-06-07 15:04:29 +03:00
|
|
|
`xz {{[-d|--decompress]}} {{[-c|--stdout]}} {{path/to/file.xz}}`
|
2016-01-28 15:42:05 -05:00
|
|
|
|
|
|
|
- Compress a file, but don't delete the original:
|
|
|
|
|
2025-06-07 15:04:29 +03:00
|
|
|
`xz {{[-k|--keep]}} {{path/to/file}}`
|
2016-01-28 15:42:05 -05:00
|
|
|
|
2016-02-01 13:48:59 -05:00
|
|
|
- Compress a file using the fastest compression:
|
2016-01-28 15:42:05 -05:00
|
|
|
|
2022-12-04 10:12:49 +01:00
|
|
|
`xz -0 {{path/to/file}}`
|
2016-01-28 16:20:30 -05:00
|
|
|
|
2016-02-01 13:48:59 -05:00
|
|
|
- Compress a file using the best compression:
|
2016-01-28 16:20:30 -05:00
|
|
|
|
2022-12-04 10:12:49 +01:00
|
|
|
`xz -9 {{path/to/file}}`
|