This post is older than a year. Consider some information might not be accurate anymore.
This post demonstrates how to extract the file contents of an rpm package, for e.g. analyzing the rpm packaging.
We need two commands for that:
- rpm2cpio - Extract cpio archive from RPM Package Manager (RPM) package.
- cpio - copy files to and from archives
To extract in current directory
rpm2cpio appl-1.0.0.noarch.rpm | cpio -idmv
cpio options explained:
-
-i
extract -
-d
make-directories -
-m
preserve-modification-time -
-v
verbose :-)