gzip

Functionality

Option

Description

-d

De - compression (default: compression)

-c

Send output to stdout

Associated Tools

  • gunzip. Equivalent of gzip -d.

  • zgrep. Grepping in gzip-compressed files.

  • zcat. Equivalent of gzip -cd.

  • zless. Paging a compressed file.

Examples

  • Compressing the file cd.iso. cd.iso appears to be moved to cd.iso.gz.

    $ gzip cd.iso
    
  • Compressing cd.iso, but keeping the original intact.

    $ gzip -c cd.iso > cd.iso.gz
    
  • De compressing the file cd.iso.gz. cd.iso.gz appears to be moved to cd.iso.

    $ gzip -d cd.iso.gz
    
  • De compressing cd.iso.gz, but keeping the original intact.

    $ gzip -cd cd.iso.gz > cd.iso