Compressing files with gzip
Compress
Compress all files recursively from the current directory:
gzip -r .
Compress only JSON files recursively:
find . -type f -name '*.json' -exec gzip {} \;
Decompress
Decompress all files recursively:
gunzip -r .
Decompress matching files and keep the originals:
gunzip -k *.log.gz