Product SiteDocumentation Site

4.2.9. Combining queries

The rpm command is very flexible in allowing you to combine queries. Just start the command with rpm –q and add the various options either on their own, such as –q with –s and –f, or together, such as –qsf.
The following sections show a few handy combinations of the options you can use for real-world package-management tasks. Listing Package Description and Documentation Files

To find information on a package and where it is documented, use the –qdi option to rpm (a combination of the –q, –d, and –i options):
rpm -qdi grep
Name        : grep                         Relocations: (not relocatable)
Version     : 2.6.3                             Vendor: Fedora Project
Release     : 1.fc13                        Build Date: Wed 07 Apr 2010 05:58:58 PM EDT
Install Date: Fri 27 Aug 2010 07:03:07 PM EDT      Build Host:
Group       : Applications/Text             Source RPM: grep-2.6.3-1.fc13.src.rpm
Size        : 800493                           License: GPLv3+
Signature   : RSA/SHA256, Wed 07 Apr 2010 06:48:20 PM EDT, Key ID 7edc6ad6e8e40fde
Packager    : Fedora Project
URL         :
Summary     : Pattern matching utilities
Description :
The GNU versions of commonly used grep utilities. Grep searches through
textual input for lines which contain a match to a specified pattern and then
prints the matching lines. GNU's grep utilities include grep, egrep and fgrep.

GNU grep is needed by many scripts, so it shall be installed on every system.
It can sometimes be difficult to track down the documentation for a given package. Some packages use Unix manual pages; others use info files, and still others provide HTML for other formatted manuals. Some have no real documentation at all.