Compression and Archives

gunzip

Decompresses gzip files.

gunzip restores files compressed with gzip, typically ending in .gz.

Syntax
gunzip [options] file.gz...

Arguments explained

  • file.gz is the compressed file.
  • -k keeps the compressed input.
  • -c writes decompressed data to standard output.

Common examples

Decompress a file
gunzip app.log.gz

Restores app.log and removes app.log.gz by default.

Preview without writing
gunzip -c app.log.gz | less

Streams decompressed text into a pager.

gunzip Command
FieldDetails
Commandgunzip
CategoryCompression and Archives
Primary useDecompresses gzip files.
Syntaxgunzip [options] file.gz...