If you need to check the contents of a compressed text file on Linux, you don’t have to uncompress it first. Instead, you can use a zcat or bzcat command to extract and display file contents while leaving the file intact. The “cat” in each command name tells you that the command’s purpose is to display content. The “z” tells you that it works with compressed files.
Which of the two commands to use depends on the type of compressed file you are examining. If the file was compressed with gzip or zip, you would use the zcat command. If the file was compressed with bzip2, you would use the bzcat command. On some systems, zcat might be called gzcat.
Source:: Network World – Data Center