Copied to clipboard

gzip

gzip is a command-line compression tool on Linux, which can compress files and store them as gzip format files. Using gzip command can greatly reduce the size of files, save disk space, and speed up file transfer.

Examples

  • Compress a file:

    gzip <file>

  • Compress a directory and all its files:

    gzip -r <dir>

  • Decompress a file:

    gzip -d <file.gz>

  • Write compressed data to standard output:

    gzip -c <file>

  • List the information of compressed files:

    gzip -l <file.gz>