Example 4.2 Script to Search for Packages
#! /bin/sh
for i in $(rpm -q -a -l | grep
echo "\"$i\" is in package:"
rpm -q -f $i
echo ""
done
The command rpm -q --changelog rpm displays a detailed list of change infor-
mation about a specific package, sorted by date. The above example shows information
about the package rpm.
With the help of the installed RPM database, verification checks can be made. Initiate
these with -V, -y or --verify. With this option, rpm shows all files in a package
that have been changed since installation. rpm uses eight character symbols to give
some hints about the following changes:
Table 4.2
RPM Verify Options
5
S
L
T
D
U
G
M
In the case of configuration files, the letter c is printed. For example, for changes to
/etc/wgetrc (wget):
rpm -V wget
S.5....T c /etc/wgetrc
$1); do
MD5 check sum
File size
Symbolic link
Modification time
Major and minor device numbers
Owner
Group
Mode (permissions and file type)
Managing Software with Command Line Tools
33