gzip
is used for compressing a single file while a tool such as tar
creates
an archive file by gathering multiple files together into a single file.
We can use gzip
to decompress a file. For example, to decompress a compressed
file example.csv.gz
replacing it with the original uncompressed version:
# Decompress a file, replacing it with the original uncompressed version using gzip [gzip, common]
$ gzip -d example.csv.gz
> example.csv # original, uncompressed version
Decompress some-file.txt.gz
replacing it with the original uncompressed
version; some-file.txt
.