Thursday, May 6, 2021

Extract files from RPM package without installing

An RPM package is a file consisting of a cpio archive that contains the files to be installed and a header that contains metadata information about the package.
You can use the simple utility tool rpm2cpio to convert the contents of an RPM package into a cpio archive and then use the cpio command to extract the contents of that archive without needing to install the RPM package.

rpm2cpio name_of_rpm_package.rpm | cpio -idmv

Note that this will extract the files to the current folder.
Here is an explanation of the options used for the cpio command:

  • i: extract files
  • d: create leading directories where needed
  • m: preserve previous file modification times for the extracted files
  • v: verbose

1 comment:

DedicatedHosting4u said...

I've read a lot of blogs, but when I read yours, I discovered a lot of valuable information, fresh material, and excellent editing. Everything about your blog is fantastic. Thank you very much for sharing this important and interesting information with us. Well, if you get time, you must checkout my website DedicatedHosting4u.com

LinkWithin

Related Posts Plugin for WordPress, Blogger...