1 / 2
To display the contents of a .gz compressed text file on the screen in Unix or Linux, you can use the following command:
zcat file.gz
The zcat
command decompresses the file and sends the output to the standard output, which is usually the screen. If you want to save the decompressed output to a file, you can use a pipe to redirect the output to a file:
zcat file.gz > decompressed_file.txt