open gz log file code example Example 1: how to decompress gzip file in linux gunzip -k file.gz Example 2: how to read .gz file zcat logfile.gz