gunzip
file managementLinux/Unix
The gunzip command is one of the most frequently used commands in Linux/Unix-like operating systems. gunzip Decompress files compressed with gzip
Quick Reference
Command Name:
gunzip
Category:
file management
Platform:
Linux/Unix
Basic Usage:
gunzip [options] [arguments]
Common Use Cases
Syntax
gunzip [options] [file...]
Options
Option | Description |
---|---|
-c, --stdout |
Write output on standard output; keep original files unchanged |
-f, --force |
Force decompression even if the output file already exists |
-h, --help |
Display help information and exit |
-k, --keep |
Keep (don't delete) input files during decompression |
-l, --list |
List compressed file contents |
-n, --no-name |
Do not restore the original name and timestamp |
-N, --name |
Restore the original name and timestamp |
-q, --quiet |
Suppress all warnings |
-r, --recursive |
Travel the directory structure recursively |
-t, --test |
Test compressed file integrity |
-v, --verbose |
Display the name and percentage reduction for each file |
Examples
How to Use These Examples
The examples below show common ways to use the gunzip
command. Try them in your terminal to see the results. You can copy any example by clicking on the code block.
# Basic Examples Basic
gunzip file.txt.gz