How to extract a file from RPM
Today I would like to extract a file in an RPM because I accidentally made some changes to a configuration file. Actually, it's not me to do that directly. rpm
changed my modified file during upgrade so I want to recover that file from the original RPM. Well, I'm not dare enough to reinstall that RPM. That's why I wanted to extract only one file.
Fortunately, there are rpm2cpio
and cpio
in RPM world.
rpm2cpio xxx-0.0.1-1.x86_64.rpm | cpio -id ./usr/bin/xxx
More info: cpio/rpm2cpio
- sugree's blog
- 521 reads
Post new comment