how to open .gz file code example Example 1: unzip a .gz file in linux gunzip file.gz Example 2: how to read .gz file zcat logfile.gz