Options (6)
-d, --decompressbooleanDecompress a file, replacing it with the original uncompressed version
gzip {{[-d|--decompress]}} {{path/to/file.gz}}-v, --verbosebooleanDisplay the name and reduction percentage for each file compressed
gzip {{[-v|--verbose]}} {{path/to/file.gz}}-k, --keepbooleanCompress a file, keeping the original file
gzip {{[-k|--keep]}} {{path/to/file}}-c, --stdoutbooleanCompress a file, specifying the output filename
gzip {{[-c|--stdout]}} {{path/to/file}} > {{path/to/compressed_file.gz}}booleanDecompress a `gzip` archive specifying the output filename
gzip {{[-cd|--stdout --decompress]}} {{path/to/file.gz}} > {{path/to/uncompressed_file}}-l, --listbooleanList the contents of a compressed file
gzip {{[-l|--list]}} {{path/to/file.txt.gz}}Examples (8)
Compress a file, replacing it with a `gzip` archive
gzip path/to/fileDecompress a file, replacing it with the original uncompressed version
gzip [-d|--decompress] path/to/file.gzDisplay the name and reduction percentage for each file compressed
gzip [-v|--verbose] path/to/file.gzCompress a file, keeping the original file
gzip [-k|--keep] path/to/fileCompress a file, specifying the output filename
gzip [-c|--stdout] path/to/file > path/to/compressed_file.gzDecompress a `gzip` archive specifying the output filename
gzip [-cd|--stdout --decompress] path/to/file.gz > path/to/uncompressed_fileSpecify the compression level. 1 is the fastest (low compression), 9 is the slowest (high compression), 6 is the default
gzip -1..9 [-c|--stdout] path/to/file > path/to/compressed_file.gzList the contents of a compressed file
gzip [-l|--list] path/to/file.txt.gz