Extract files from an RPM package
RPM (Red Hat Package Management) packages are installation files used by Red Hat Linux distributions. RPM is popular because it makes programs easy to install and remove. An RPM is an archive containing files, scripts, and special metadata (package dependencies and changelogs). To extract particular files from an RPM package, follow these steps. Steps to extract an RPM:
- Go to the directory containing the RPM file.
- Create a new directory for the extracted files and enter it.
- Use rpm2cpio and cpio to extract the files. [user@linux ~]$ cd ~/downloads [user@linux downloads]$ ls openmotif* openmotif-2.3.0-0.3.el5.i386.rpm [user@linux downloads]$ mkdir openmotif [user@linux downloads]$ cd openmotif [user@linux openmotif]$ rpm2cpio ../openmotif-2.3.0-0.3.el5.i386.rpm | cpio -cidv […] ./etc/X11/mwm/system.mwmrc ./etc/X11/xinit/xinitrc.d/xmbind.sh ./usr/bin/mwm ./usr/bin/xmbind ./usr/include/X11/bitmaps/xm_error ./usr/include/X11/bitmaps/xm_hour16 ./usr/include/X11/bitmaps/xm_hour16m ./usr/include/X11/bitmaps/xm_hour32 ./usr/include/X11/bitmaps/xm_hour32m […]