Linux:RPM

From My Notepad
Jump to: navigation, search

View RPM Information

rpm -qpi {}

View RPM contents

rpm -qpl {}

Extract RPM contents using cpio

rpm2cpio {} | cpio -ivd

Extract single file from RPM using cpio

rpm2cpio {} | cpio -ivd [filename]

Extract scripts from RPM

rpm -qp --scripts {}

Find which package a file belongs to

rpm -qf <filename>

Verify an installed package

rpm -V <package>

Verify all installed packages

for i in `rpm -qa | sort`; do echo $i; rpm -V $i; echo; echo; echo; done