$ gzip
Compress or expand files
DOCUMENTEDArchivesUbuntu 24.04 LTS baseline
Synopsis
gzip [OPTION]... [FILE]...
What it does
- `gzip` compresses each specified file and normally replaces it with a `.gz` file.
- `gzip -d` decompresses gzip data.
Examples
Compress a file
gzip file.txtDecompress a gzip file
gzip -d file.txt.gzImportant details
These examples are intentionally conservative. Command behavior can still depend on filesystem state, permissions, locale, shell, installed package version, and other system configuration.
For exact option semantics, the linked authoritative documentation is the source of truth.