Datasheet
“main” (Installation and Administration) — 2004/6/25 — 13:29 — page 180 — #206
i
i
i
i
i
i
i
i
Example 5.3: Script to Search for Packages
#! /bin/sh
for i in $(rpm -q -a -l | grep $1); do
echo "\"$i\" is in package:"
rpm -q -f $i
echo ""
done
The command rpm -q --changelog rpm displays a detailed list of
information (updates, configuration, modifications, etc.) about a specific
package. This example shows information about the package rpm. How-
ever, only the last five change entries in the RPM database are listed. All
entries (dating back the last two years) are included in the package itself.
This query only works if CD 1 is mounted at /media/cdrom/:
rpm -qp --changelog /media/cdrom/suse/i586/rpm-3*.rpm
With the help of the installed RPM database, verification checks can be
made. These checks are initiated with the option -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 5.3: RPM Verify Options
5 MD5 check sum
S File size
L Symbolic link
T Modification time
D Major and minor device numbers
U Owner
G Group
M Mode (permissions and file type)
In the case of configuration files, the letter c is printed. Example for
changes to /etc/wgetrc (wget):
180 5.3. RPM — the Package Manager










