UNIX gunzip command

863 Views Asked by At

gunzip will unzip the gz file and displays the result

Is there any option to get list of files/file name that were compressed to .gz file

eg:sample.gz contains 2 files

file1.txt abc

file2.txt def

gunzip -c sample.gz o/p:abc def

But I need file names.

Thanks in advance.

1

There are 1 best solutions below

2
On

You can use gunzip -l option to see the name of file which will be uncompressed.