Product SiteDocumentation Site

4.2.4. Listing the configuration files for a package

The –c option tells rpm –q to list the configuration files for a package. You can also use the longer option, --configfiles, in place of –c. The basic syntax is:
rpm –qc package_name
For example:
rpm -qc bash
        /etc/skel/.bash_logout
        /etc/skel/.bash_profile
        /etc/skel/.bashrc
This command lists the configuration files for the bash package.
Some packages don’t have configuration files, as shown following:
rpm -qc python
        
In this case, the rpm command provides no output. Other packages have a lot of configuration files, such as the sendmail mail transfer agent, as shown following:
rpm -qc sendmail
        /etc/aliases
        /etc/mail/Makefile
        /etc/mail/access
        /etc/mail/domaintable
        /etc/mail/helpfile
        /etc/mail/local-host-names
        /etc/mail/mailertable
        /etc/mail/sendmail.mc
        /etc/mail/statistics
        /etc/mail/trusted-users
        /etc/mail/virtusertable
        /etc/rc.d/init.d/sendmail
        /etc/sendmail.cf
        /etc/sysconfig/sendmail
        /usr/lib/sasl/Sendmail.conf
As with the –l option, the –v option provides more information on each file, as shown following:
rpm -qcv bash
-rw-r--r--    1 root    root                       18 May 21 13:32 /etc/skel/.bash_logout
-rw-r--r--    1 root    root                      176 May 21 13:32 /etc/skel/.bash_profile
-rw-r--r--    1 root    root                      124 May 21 13:32 /etc/skel/.bashrc