mobile logo

Extracting files from rpm and deb packages

posted on July 22, 2008 / IN Linux / Quick Tip / 0 Comments

We 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:


$ dpkg-deb -x <package.deb> /restore/dir


$ rpm2cpio <package.rpm> | cpio -idv

By admin

Tagged With

No Comments

Please use the form to leave a comment

Leave a comment.