The Linux Newbie Guide  ⇒    Fundamentals     Advanced     Supplement   Command Index   ENG⇒中
All rights reserved, please indicate the source when citing
  

zcat - Read the Contents of .gz Compressed Files 

zcat 是 gzip concatenate 也就是 gzip + cat 這兩個指令的綜合體,即不用解壓縮壓縮檔〝.gz〞就可讀取其內容,因 cat 只能讀文字檔,故 zcat 只能讀取文字檔所壓縮成的 .gz 檔。

The zcat command is a combination of gzip and cat . It allows you to view the contents of a text file that has been compressed with the ".gz" format without having to decompress it first.

The syntax of the zcat command is straightforward:

This command will display the contents of the file."txt.gz" compressed file directly to the terminal.

Example:
$ zcat prj1.c.gz

Please note that zcat can only be used to read compressed text files ".gz". If the file is not a compressed text file, zcat will not work.

For more examples and information about zcat, you can refer to the provided link.