gzip
gzip is a Linux command in the Archives & Compression category, rated intermediate difficulty. Compresses files using Lempel-Ziv coding. Produces .gz files. The syntax is gzip [options] [file]. Key options and parameters: file — file(s) to compress. It returns compressed .gz file. A practical example: gzip file.txt # Creates file.txt.gz gzip -d file.txt.gz # Decompress gzip -k file.txt # Keep original file gzip -l file.txt.gz # List compression info A close relative is tar, which creates and extracts tar archives. The standard Unix archiving tool. A close relative is gunzip, which decompresses .gz files created by gzip. A close relative is zip, which creates compressed ZIP archives (cross-platform format). More about this category: Linux archive commands — tar, gzip, zip, unzip, and more. Compress and extract files and archives. Related Archives & Compression commands: tar, gunzip, zip, unzip, xz, zcat, bunzip2, bzip2.