Loading...

Decompress gzip files

:heavy_exclamation_mark: This post is older than a year. Consider some information might not be accurate anymore. :heavy_exclamation_mark:

Unzip gzip files

Having a bunch of compressed files:

access.log.10.gz
access.log.11.gz
access.log.12.gz
access.log.13.gz
access.log.14.gz
access.log.2.gz
access.log.3.gz
access.log.4.gz
access.log.5.gz
access.log.6.gz
access.log.7.gz
access.log.8.gz
access.log.9.gz

To decompress all files in the current path, we use the find command with -exec option. The command itself is gzip --decompress or gunzip.

find . *.gz -exec gzip -d {} \;

Also possible and easier:

gunzip *.gz
Please remember the terms for blog comments.