How to extract files from an rpm


rpm2cpio program.rpm | cpio -idmv

According to the man page, cpio is aprogram that can copy files to and from archives.
The flags used are described as follows:
-i : read from stdin
-d : create directories
-m : preserve modification time
-v : verbose

‘cpio’ is listed as one of the archive formats that the program supports. Given that, the program ‘rpm2cpio’ is self explanatory.