Loading...

Decompress gzip files

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