Thursday, May 15, 2008

RPM Queries

The simplest RPM query verifies whether a specific package is installed. The following command verifies the installation of the Samba package:

# rpm -q samba
samba-3.0.23c-2.e15.2

You can do more with RPM queries as described below. Note how queries are associated with -q or --query; full word switches such as --query are usually associated with a double-dash.

rpm -qa Lists all installed packages.

rpm -qf /path/to/file Identifies the package associated with /path/to/file

rpm -qc packagename Lists only configuration files from packagename

rpm -qi packagename Displays basic information for packagename

rpm -ql packagename Lists all files from packagename

rpm -qR packagename Notes all dependencies; you can't install packagename without them

0 comments: