[colug-432] opening cpio files with PHP?

Scott Merrill skippy at skippy.net
Mon Feb 7 09:14:35 EST 2011


I have a collection of tarred cpio files. Each cpio file contains a
data file and a metadata file. I'm working on a PHP web-based
interface to allow a user to select a specific data file from within
the tarball and download just it. This means extracting the tar, then
extracting the cpio to get just the data file. I found Archive_Tar on
PEAR (http://pear.php.net/package/Archive_Tar) which will allow me to
manipulate the tar files with PHP, but I have not yet found a way to
open the cpio files from PHP.

I'd rather not invoke PHP's exec() function to access the system's
/bin/cpio if I can avoid it.

Does anyone have a PHP library for manipulating cpio files?


More information about the colug-432 mailing list