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.
- Gzip helps reduce the size of files, which is particularly useful for storage and transfer efficiency.
- It uses the Deflate algorithm to compress files.
- Compressed files typically bear the ".gz" extension.
- Gzip is commonly used in conjunction with tar to create compressed archives (.tar.gz or .tgz).
- When compressing a file, gzip replaces the original file with the compressed version.
- It can compress individual files or multiple files in a directory.
- The command to compress a file using gzip is simply "gzip" followed by the file name.
- Decompressing a file is done with the command "gunzip" followed by the compressed file name.
- Gzip also supports some additional options, such as "-r" for recursively compressing directories and "-d" for directly decompressing files.
- 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 machineexplain this command
-
gzip:tldr:26e62 gzip: Compress a file specifying the output filename.$ gzip -c ${file-ext} > ${compressed_file-ext-gz}try on your machineexplain this command
-
gzip:tldr:43878 gzip: Decompress a file, replacing it with the original uncompressed version.$ gzip -d ${file-ext}.gztry on your machineexplain this command
-
gzip:tldr:6ebef gzip: Compress a file, replacing it with a gzipped compressed version.$ gzip ${file-ext}try on your machineexplain 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 machineexplain this command
-
gzip:tldr:fd22d gzip: Compress a file, keeping the original file.$ gzip --keep ${file-ext}try on your machineexplain this command