Unable to extract .gz file using gunzip

Linux 3.8.13-16.2.1.el6uek.x86_64 #1 SMP Thu Nov 7 17:01:44 PST 2013 x86_64 x86_64 x86_64 GNU/Linux

Hi all,

I am unable to extract .gz file using gunzip

Used the following command to create the .gz file:

nohup tar -cvpf - 11.2.0.4  | gzip -c > /u01/Test_hot_1222017/11.2.0.4_OH_Bkp_1212017.gz & 

I get the file created as

-rwxrwxrwx 1 oratst dba 5466458195 Jan 21 06:08 11.2.0.4_OH_Bkp_1212017.gz

Now, when I gunzip the file to extract the file contents, I get the following message:

-bash-4.1$ gunzip 11.2.0.4_OH_Bkp_1212017.gz | tar xvf -
tar: This does not look like a tar archive
tar: Exiting with failure status due to previous errors

Please advise how to extract the 11.2.0.4_OH_Bkp_1212017.gz file?

Thanks for your help and time!

Regards,

gunzip filename

does not print to stdout, that unzips the file itself on disk without printing its contents.

You may try gunzip < filename | tar ... but I suspect the gz is not there any more, and just tar ... < filename will do.

You might also look in your manual pages for tar and see if the -z flag is supported. This will allow you to write/read gzip format compressed archive files in one command rather than piping a tar into/from a gzip.

Robin

Try this.

gzip -dc 11.2.0.4_OH_Bkp_1212017.gz | tar -xvzf -

Cheers...!