WIP Alert This is a work in progress. Current information is correct but more content may be added in the future.
$ gzip my-file.txt
Archive file is created and the original file is removed.
$ ls file.txt.gz
Extract gz file
gunzip is installed along with
$ gunzip file.txt.gz
The file is extracted in the current directory and the archive file is removed:
$ ls file.txt
Extract file to another directory
gunzip file.gz -c > path/to/extracted/file
$ gunzip file.txt.gz > foo/bar/extracted-file.txt
The original archive file is kept (showing output with
$ tree . ├── file.txt.gz └── foo └── bar └── extracted-file.txt