18

I am receiving this error message when I'm trying to uncompress a .tgz archive:

$ tar -zxvf OVM_EL5U3_X86_EBIZ12.1.1_DB_VIS_PVM.tgz.1
gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Error is not recoverable: exiting now

As you can see, the file name ends with .tgz.1.

When the file name is .tgz.0 it will be uncompressed with no error by the tar -zxvf command.

hitesh
  • 181

3 Answers3

14

This is what I found after a quick google search, a PDF explaining how to correctly extract the contents of the file.

Looks like there are several files:

OVM_EL5U3_X86_EBIZ12.1.1_DB_VIS_PVM.tgz.0
OVM_EL5U3_X86_EBIZ12.1.1_DB_VIS_PVM.tgz.1
OVM_EL5U3_X86_EBIZ12.1.1_DB_VIS_PVM.tgz.2
OVM_EL5U3_X86_EBIZ12.1.1_DB_VIS_PVM.tgz.3
OVM_EL5U3_X86_EBIZ12.1.1_DB_VIS_PVM.tgz.4
OVM_EL5U3_X86_EBIZ12.1.1_DB_VIS_PVM.tgz.5
OVM_EL5U3_X86_EBIZ12.1.1_DB_VIS_PVM.tgz.6
OVM_EL5U3_X86_EBIZ12.1.1_DB_VIS_PVM.tgz.7

You need to copy all those files to a specific directory, for example /OVS/seed_pool/. Then run the following commands:

# cd /OVS/seed_pool
# cat OVM_EL5U3_X86_64_EBIZ12.1.1_DB_VIS_PVM.tgz.0 \
OVM_EL5U3_X86_64_EBIZ12.1.1_DB_VIS_PVM.tgz.1 \
OVM_EL5U3_X86_64_EBIZ12.1.1_DB_VIS_PVM.tgz.2 \
OVM_EL5U3_X86_64_EBIZ12.1.1_DB_VIS_PVM.tgz.3 \
OVM_EL5U3_X86_64_EBIZ12.1.1_DB_VIS_PVM.tgz.4 \
OVM_EL5U3_X86_64_EBIZ12.1.1_DB_VIS_PVM.tgz.5 \
OVM_EL5U3_X86_64_EBIZ12.1.1_DB_VIS_PVM.tgz.6 \
OVM_EL5U3_X86_64_EBIZ12.1.1_DB_VIS_PVM.tgz.7 | tar -xz

Note that those are only 2 commands, denoted with the starting #.

Those commands shall create the following directory structure, with these files inside:

/OVS/seed_pool/OVM_EL5U3_X86_64_EBIZ12.1.1_DB_VIS_PVM
|
|- System.img (OS image file)
|- ebs1211db.img.img (Oracle E-Biz 12.1.1 DB Tier image file)
|- vm.cfg (VM configuration file)
|- README.txt

For more help, please look into the PDF mentioned above.

ThiagoPonte
  • 1,916
  • You don’t have to list all the files manually, a wildcard * or ? would automatically list them in the alphabetical order, so cat OVM_EL5U3_X86_64_EBIZ12.1.1_DB_VIS_PVM.tgz.* | tar -xz should suffice. (You can test the behavior with echo OVM_EL5U3_X86_EBIZ12.1.1_DB_VIS_PVM.tgz.*.) – Melebius Jul 01 '20 at 06:39
4

The tar.gz/tgz file you are having is split into multiple files. (tgz.0, tgz.1,tgz.2 etc..)

So that's the reason when you try to extract using the command

tar -zxvf OVM_EL5U3_X86_EBIZ12.1.1_DB_VIS_PVM.tgz.0

it works properly. But the contents wont be fully available.

Use the cat command to combine all the OVM_EL5U3_X86_64_EBIZ12.1.1_DB_VIS_PVM.tgz.* parts into one tar.gz file

then use the command

tar -zxvf OVM_EL5U3_X86_EBIZ12.1.1_DB_VIS_PVM.tgz
devav2
  • 36,312
2

These two commands didn't work:

$ cat OVM_EL5U3_X86_64_EBIZ12.1.1_DB_VIS_PVM.tgz.* |  tar zxvf - 
stdin: not in gzip format\ntar: Child died with signal 13\ntar: 
Error is not recoverable: exiting now\ncat: write error: Broken pipe\n’, None

$ cat OVM_EL5U3_X86_64_EBIZ12.1.1_DB_VIS_PVM.tgz.0 \
OVM_EL5U3_X86_64_EBIZ12.1.1_DB_VIS_PVM.tgz.1 \
OVM_EL5U3_X86_64_EBIZ12.1.1_DB_VIS_PVM.tgz.2  | | tar -xz  `
cat: OVM_EL5U3_X86_64_EBIZ12.1.1_DB_VIS_PVM.tgz.1 No such file or directory\ncat:
 OVM_EL5U3_X86_64_EBIZ12.1.1_DB_VIS_PVM.tgz.2

This worked for me:

$ cat OVM_EL5U3_X86_64_EBIZ12.1.1_DB_VIS_PVM.tgz.0 OVM_EL5U3_X86_64_EBIZ12.1.1_DB_VIS_PVM.tgz.1 
OVM_EL5U3_X86_64_EBIZ12.1.1_DB_VIS_PVM.tgz.2  | tar -xz`

The difference was just using a space instead of \.

Zanna
  • 70,465
  • Dont' blame line continuation backslash as an alternative to space, as it must not have any significance. Instead, note that you have double pipe cat ….tgz.2 | | tar -xz in the second command, which attempts to pipe cat output into an empty command before finally passing it to tar — that is usually a syntax error and should not even have started at all. – Anton Samsonov Jan 11 '24 at 12:48