Extracting files from rpm and deb packages
Tuesday, July 22nd, 2008We ran into an issue where an init script was missing and we needed to restore the file. The backup (of course) did not include the file we needed. We had to download the package, extract the contents, and move the init script back into place. Below are the commands used:
DEB:
$ dpkg-deb -x <package.deb> /restore/dir
RPM:
$ rpm2cpio <package.rpm> | cpio -idv