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 section 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 the rpm command (a combination of the –q, –d, and –i options):
# rpm -qdi grep
Name : grep Relocations: /usr
Version : 2.5.1 Vendor: Red Hat,
Release : 4 Build Date: Sat 20 Jul
2002 01:08:48 AM CDT
Install date: Sat 05 Oct 2002 12:21:58 PM CDT Build
Group : Applications/Text Source RPM: grep-2.5.1-
Size : 475770 License: GPL
Signature : DSA/SHA1, Tue 03 Sep 2002 04:17:47 PM CDT, Key ID
219180cddb42a60ePackager : Red Hat, Inc.
Summary : The GNU versions of grep 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.
You should install grep on your system, because it is a very useful
utility for searching text.
It's often hard 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.