RPM (Red Hat Package Manager) is an default open source and most popular package management utility in Redhat Linux. The tool allows users to install, update, uninstall, query, verify and manage system software packages in Unix/Linux operating systems. Here are some very useful commands
Show all changes have been made after you install a package.
1 2 3 4 5 6
[root@www 7]# rpm -Va ..5...... /usr/lib/firmware/vpu_d.bin S.5....T. c /etc/yum/pluginconf.d/langpacks.conf S.5....T. c /etc/ssh/sshd_config S.5....T. c /etc/sysctl.conf .M....... g /var/log/dmesg
S T c g have different meanings
S :(file Size differs) M :(Mode differs) 5 :(MD5 sum differs) D :(Device major/minor number mis-match) L :(readLink(2) path mis-match) U :(User ownership differs) G :(Group ownership differs) T :(mTime differs) c :(config file) d :(documentation) g :(ghost file) l :(license file) r :(read me) ###To be specific, you want to know whether special file was changed
1 2
[root@www 7]# rpm -Vf /etc/default/grub S.5....T. c /etc/grub.d/40_custom
It shows /etc/default/grub has been changed S(size) 5 (MD5 sum differs), T (Mtime ).