cpio: Bad magic number/header.

Hi,

i got the following error while unpacking the archive file.

cpio -icvd < as_sun_x86_101202_disk2.cpio
Disk2/stage/Components/oracle.webdb.wwdoc/10.1.2.0.1/1/DataFiles/wwdoc.jar
Disk2/stage/Components/oracle.webdb.wwdoc/10.1.2.0.1/1/DataFiles
Disk2/stage/Components/oracle.webdb.wwdoc/10.1.2.0.1/1
Disk2/stage/Components/oracle.webdb.wwdoc/10.1.2.0.1
Disk2/stage/Components/oracle.webdb.wwdoc
Disk2/stage/Components/oracle.webdb.wwi/10.1.2.0.1/1/DataFiles/wwi.jar
cpio: Bad magic number/header.
1 errors

please help

You can get this error when bringing cpio from a foreign system, because magic numbers on the remote box do not match local magic numbers. Or the file you are loading is bad or was bad to start with.

use the cpio -k option to skip header checking.

magic number example
#!/bin/something

The #! is a unversal magic number on line one, the first two bytes of the file. It means

  1. this is a script
  2. exec is expected to invoke the "/bin/something" as an interpreter. /bin/something is not part of the magic number.

Try it with the "ASCII headers" switch on both output and input commands. The exact syntax depends on the Operating System.

Also, cpio can't deal with files larger than 2 Gb.