13,420
edits
Changes
no edit summary
:: <b><code><span style="color:#3366CC;font-size:1.2em;">grep ________________ ________________ | wc -l'''</span></code></b>
<ol>
<li value="39">Using the <code>rpm</code> command: you can also use the following commands to list all the installed packages, and the total number of packages installed:</li>
</ol>
::<b><code><span style="color:#3366CC;font-size:1.2em;">rpm -q -a'''</span></code></b>
::<b><code><span style="color:#3366CC;font-size:1.2em;">rpm -qa | wc -l'''</span></code></b>
<ol>
<li value="410">The <code>'''-q'''</code> option means query, and the <code>'''-a'''</code> option means all (in other words, query all installed software packages). Did you get the same number of packages from the above two methods?</li>
<li>Some of the files on your system were installed with the software packages, and some were created by system activity (for example, by creating your Learn account and by logging in). If you know the package name (from the <code>install.log</code>), you can list all the files that were installed from the package by using the following command:</li>
</ol>
::<b><code><span style=" pointer-events:none;cursor:default;color:#3366CC;font-size:1.2em;">rpm -q -l package_name</span></code></b> (where "package_name" represents the name of the ''application'' or ''package'')
<ol>
<li value="612">This combines the <code>'''-q'''</code> (query) option with the <code>'''-l'''</code> (list filenames) option</li>
<li>You can pipe the outupt through <code>'''wc -l'''</code> to count the number of lines:</li>
</ol>
::<b><code><span style=" pointer-events:none;cursor:default;color:#3366CC;font-size:1.2em;">rpm -ql package_name| wc -l</span></code></b>
<ol>
<li value="814">Using what you learned in steps 3, 4, and 7, get a count of the total number of files installed by all of the software packages on your system.</li>
</ol>