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.
18 Responses to “What the heck do I do with a .cpio file?”
-
spiralbound.net » How To Install Oracle 10g on RedHat Enterprise 3 Says:
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: [...]
-
Tom Buechi Says:
April 13th, 2006 at 3:54 pmOn HP-UX 11 I needed to add the -c option. I share your frustration with these cpio files.
-
Jon Says:
April 13th, 2006 at 6:25 pmGood to know. Thanks Tom!
-
renish Says:
May 8th, 2006 at 4:28 amcpio -idmv
-
renish Says:
May 8th, 2006 at 4:30 amthanks, helpful in extracting oracle application server 10g on sun solaris
-
David Mould Says:
September 18th, 2006 at 1:28 amFinally an actual usable example of cpio.
Thanks very much LAC
-
Chris Says:
February 5th, 2007 at 11:57 amExactly what I needed – thanks for the info.
-
Hans Sieburg Says:
March 13th, 2007 at 12:51 pmi have the same problems with informix and hp/ux distributions. thanks for the examples!
-
Andrew Says:
March 27th, 2007 at 8:17 pmI did exactly what you said, but still can not deal with oracle cpio files.
My OS is CentOs4.4
Any suggestion? -
Andrew Says:
March 27th, 2007 at 8:32 pmI did it.
I use [cat cpio_filename.cpio | cpio -icd]. -
Jon Emmons Says:
March 27th, 2007 at 9:08 pmThanks for sharing Andrew. I haven’t run into this problem, but I haven’t had much contact with CentOs.
-
Manjula Says:
July 11th, 2007 at 5:14 pmThis is exactly what I needed .Thank you
-
Peter Says:
April 12th, 2008 at 1:01 pmFrom 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.
-
Robert Says:
August 16th, 2008 at 1:23 pmThanks! 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
-
Robert Says:
August 16th, 2008 at 1:24 pmThanks! 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
-
Rob larson Says:
September 25th, 2008 at 7:19 pmO my lord! A website that does not give me 1000pages of garbage to read! Thank You so much….. =)
-
Gene Amtower Says:
October 24th, 2008 at 5:04 pmVery helpful, and I just LOVE the Story Pulse graph at the bottom of the page, too.
-
Vlado Peshov Says:
October 1st, 2009 at 10:00 amThanks for sharing this, because I thought that cpio were corrupted and was thinking downloading cpio files again.
Just a note: I didn’t have to put extra “c” parameter on Debian/Ubuntu/Centos4/Centos5
Regards

