gzip Command Examples

Compress/uncompress files with gzip compression (LZ77). More information: https://www.gnu.org/software/gzip/manual/gzip.html.

gzip {{path/to/file}}

gzip {{-d|--decompress}} {{path/to/file.gz}}

gzip {{-k|--keep}} {{path/to/file}}

gzip {{-c|--stdout}} {{path/to/file}} > {{path/to/compressed_file.gz}}

gzip {{-c|--stdout}} {{-d|--decompress}} {{path/to/file.gz}} > {{path/to/uncompressed_file}}

gzip -{{1..9}} {{-c|--stdout}} {{path/to/file}} > {{path/to/compressed_file.gz}}

gzip {{-v|--verbose}} {{-d|--decompress}} {{path/to/file.gz}}