2025-03-14 21:59:59 -06:00
|
|
|
# gunzip
|
|
|
|
|
|
|
|
|
|
> Extract files from a `gzip` (`.gz`) archive.
|
|
|
|
|
> More information: <https://manned.org/gunzip>.
|
|
|
|
|
|
|
|
|
|
- Extract a file from an archive, replacing the original file if it exists:
|
|
|
|
|
|
|
|
|
|
`gunzip {{archive.tar.gz}}`
|
|
|
|
|
|
|
|
|
|
- Extract a file to a target destination:
|
|
|
|
|
|
2025-09-14 18:48:49 -06:00
|
|
|
`gunzip {{[-c|--stdout]}} {{archive.tar.gz}} > {{archive.tar}}`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- Extract a file and keep the archive file:
|
|
|
|
|
|
2025-09-14 18:48:49 -06:00
|
|
|
`gunzip {{[-k|--keep]}} {{archive.tar.gz}}`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- List the contents of a compressed file:
|
|
|
|
|
|
2025-09-14 18:48:49 -06:00
|
|
|
`gunzip {{[-l|--list]}} {{file.txt.gz}}`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- Decompress an archive from `stdin`:
|
|
|
|
|
|
|
|
|
|
`cat {{path/to/archive.gz}} | gunzip`
|