Forrest logo
tool overview
On this page you find all important commands for the CLI tool gzip. If the command you are looking for is missing please ask our AI.

gzip

Gzip is a command line tool used for file compression and decompression in Unix-like operating systems. It is short for GNU zip.

  1. Gzip helps reduce the size of files, which is particularly useful for storage and transfer efficiency.
  2. It uses the Deflate algorithm to compress files.
  3. Compressed files typically bear the ".gz" extension.
  4. Gzip is commonly used in conjunction with tar to create compressed archives (.tar.gz or .tgz).
  5. When compressing a file, gzip replaces the original file with the compressed version.
  6. It can compress individual files or multiple files in a directory.
  7. The command to compress a file using gzip is simply "gzip" followed by the file name.
  8. Decompressing a file is done with the command "gunzip" followed by the compressed file name.
  9. Gzip also supports some additional options, such as "-r" for recursively compressing directories and "-d" for directly decompressing files.
  10. Gzip works efficiently on a single file, but does not support compressing multiple files simultaneously like the zip command.

List of commands for gzip:

  • gzip:tldr:027f4 gzip: Specify the compression level. 1=Fastest (Worst), 9=Slowest (Best), Default level is 6.
    $ gzip -9 -c ${file-ext} > ${compressed_file-ext-gz}
    try on your machine
    explain this command
  • gzip:tldr:26e62 gzip: Compress a file specifying the output filename.
    $ gzip -c ${file-ext} > ${compressed_file-ext-gz}
    try on your machine
    explain this command
  • gzip:tldr:43878 gzip: Decompress a file, replacing it with the original uncompressed version.
    $ gzip -d ${file-ext}.gz
    try on your machine
    explain this command
  • gzip:tldr:6ebef gzip: Compress a file, replacing it with a gzipped compressed version.
    $ gzip ${file-ext}
    try on your machine
    explain this command
  • gzip:tldr:802f4 gzip: Decompress a gzipped file specifying the output filename.
    $ gzip -c -d ${file-ext}.gz > ${uncompressed_file-ext}
    try on your machine
    explain this command
  • gzip:tldr:fd22d gzip: Compress a file, keeping the original file.
    $ gzip --keep ${file-ext}
    try on your machine
    explain this command
tool overview