What the heck do I do with a .cpio file?
Categories: Database Administration, Information Technology, Oracle, System Administration, UNIXFor some unknown reason, Oracle considers it necessary to distribute their UNIX software in .cpio files. Since this is the only time I ever use cpio, I can never remember the command and I always end up looking it up.
Well, for future reference, here is how you extract a .cpio file to the current directory on most platforms:
cpio -idmv < filename_to_extract.cpio
Some platforms, like AIX, may give errors like this with these options:
cpio: 0511-903 Out of phase!
cpio attempting to continue…
cpio: 0511-904 skipping 732944 bytes to get back in phase!
One or more files lost and the previous file is possibly corrupt!
cpio: 0511-027 The file name length does not match the expected value.
If you run into these you need to add the c option as the headers are stored in ASCII. The command should now look like this:
cpio -idcmv < filename_to_extract.cpio
For more information refer to the man page for cpio, but this is all I ever do with cpio. For a better UNIX archiving utility, consider tar.


October 25th, 2005 at 2:21 pm
[…] So you’ve got Oracle 10G and you want to install it on your RedHat Enterprise 3 server. Well, since Oracle can’t manage to create tar files like everyone else in the world, you have to find a way of dealing with the .cpio they send you. Here’s how to get it extracted: […]
April 13th, 2006 at 3:54 pm
On HP-UX 11 I needed to add the -c option. I share your frustration with these cpio files.
April 13th, 2006 at 6:25 pm
Good to know. Thanks Tom!
May 8th, 2006 at 4:28 am
cpio -idmv
May 8th, 2006 at 4:30 am
thanks, helpful in extracting oracle application server 10g on sun solaris
September 18th, 2006 at 1:28 am
Finally an actual usable example of cpio.
Thanks very much LAC
February 5th, 2007 at 11:57 am
Exactly what I needed - thanks for the info.
March 13th, 2007 at 12:51 pm
i have the same problems with informix and hp/ux distributions. thanks for the examples!
March 27th, 2007 at 8:17 pm
I did exactly what you said, but still can not deal with oracle cpio files.
My OS is CentOs4.4
Any suggestion?
March 27th, 2007 at 8:32 pm
I did it.
I use [cat cpio_filename.cpio | cpio -icd].
March 27th, 2007 at 9:08 pm
Thanks for sharing Andrew. I haven’t run into this problem, but I haven’t had much contact with CentOs.
July 11th, 2007 at 5:14 pm
This is exactly what I needed .Thank you
April 12th, 2008 at 1:01 pm
From my experience of moving installs around, some versions of tar don’t like working with very large tarballs. Solaris 8 was particularly bad - so I guess that’s why they don’t use it.
August 16th, 2008 at 1:23 pm
Thanks! You betcha I was installing oracle and I was like WHAT THE HECK IS THIS!? Zip Na RAR no. Tar ball no.. Gzip Nope… Thanks for the post!
Robert
August 16th, 2008 at 1:24 pm
Thanks! You betcha I was installing oracle and I was like WHAT THE HECK IS THIS!? Zip Na RAR no. Tar ball no.. Gzip Nope… Thanks for the post!
Robert
September 25th, 2008 at 7:19 pm
O my lord! A website that does not give me 1000pages of garbage to read! Thank You so much….. =)
October 24th, 2008 at 5:04 pm
Very helpful, and I just LOVE the Story Pulse graph at the bottom of the page, too.