OS Manuals

/usr/bin/gzip

GNU data compression program

From gzip 1.15-r2 (os), captured 2026-11-05 by running gzip --help (exit 0). permalink

Usage: gzip [OPTION]... [FILE]...
Compress or uncompress FILEs (by default, compress FILES in-place).

Mandatory arguments to long options are mandatory for short options too.

  -c, --stdout      write on standard output, keep original files unchanged
  -d, --decompress  decompress
  -f, --force       force overwrite of output file and compress links
  -h, --help        give this help
  -k, --keep        keep (don't delete) input files
  -l, --list        list compressed file contents
  -L, --license     display software license
  -n, --no-name     do not save or restore the original name and timestamp
  -N, --name        save or restore the original name and timestamp
  -q, --quiet       suppress all warnings
  -r, --recursive   operate recursively on directories
      --rsyncable   make rsync-friendly archive
  -S, --suffix=SUF  use suffix SUF on compressed files
      --synchronous synchronous output (safer if system crashes, but slower)
  -t, --test        test compressed file integrity
  -v, --verbose     verbose mode
  -V, --version     display version number
  -1, --fast        compress faster
  -9, --best        compress better

With no FILE, or when FILE is -, read standard input.

Report bugs to <bug-gzip@gnu.org>.
Options (21)
OptionDescriptionSource
-c, --stdout --stdoutwrite on standard output, keep original files unchangedhelp + man
-d, --decompress --decompressDecompress.help + man
-f, --force --forceForce compression or decompression even if the file has multiple links or the corresponding file already exists, or if the compressed data is read from or written to a terminal.help + man
-h, --help --helpDisplay a help screen and quit.help + man
-k, --keep --keepKeep (don't delete) input files during compression or decompression.help + man
-l, --list --listFor each compressed file, list the following fields:help + man
-L, --license --licenseDisplay the gzip license and quit.help + man
-n, --no-name --no-nameWhen compressing, do not save the original file name and timestamp by default.help + man
-N, --name --nameWhen compressing, always save the original file name, and save the seconds part of the original modification timestamp if the original is a regular file and its timestamp is at least 1 (1970-01-01…help + man
-q, --quiet --quietSuppress all warnings.help + man
-r, --recursive --recursiveTravel the directory structure recursively.help + man
--rsyncableWhen you synchronize a compressed file between two computers, this option allows rsync to transfer only files that were changed in the archive instead of the entire archive.help + man
-S, --suffix SUFWhen compressing, use suffix .suf instead of .gz.help + man
-t, --test --testtest compressed file integrityhelp + man
-v, --verbose --verboseverbose modehelp + man
-V, --version --versiondisplay version numberhelp + man
-1, --fastcompress fasterhelp
-9, --bestcompress betterhelp
-a --asciiAscii text mode: convert end-of-lines using local conventions. (in the manual page but not in --help)man
--synchronousUse synchronous output. (in the manual page but not in --help)man
-# --fastRegulate the speed of compression using the specified digit #, where -1 or --fast indicates the fastest compression method (less compression) and -9 or --best indicates the slowest compression method… (in the manual page but not in --help)man

Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.