All rights reserved, please indicate the source when citing
gunzip Decompresses gz Files
The gunzip (GNU unzip) command is used to decompress files compressed with the gzip format (".gz" files). Its functionality is similar to using gzip -d. Additionally, gunzip can also directly decompress files compressed with the compress format (".Z" files).
The basic usage of thegunzip command is unzip [OPTIONS] FILE(S).
Some common options for gunzip are:
- -c or --stdout:Outputs to standard output.
- -d or --decompress:Decompresses (default behavior)
- -k or --keep:Keep the original compressed files after decompression. By default, gunzip removes the compressed file after successfully decompressing it.
- -r or --recursive:Decompress files in subdirectories recursively.
- -v or --verbose:Display verbose output, showing the progress and details of the decompression process.
Example:
$ gunzip * ← Decompresses all ".gz" files in the working directory
$ gunzip file.Z ← Decompresses the ".Z" file.
|
For more gunzip examples, refer to the provided link.