The first will only look for a package named php (not likely to be useful). The second will query all of your rpms installed for any title that has php in it. Much more useful. The second is my preferred method for cli based rpm queries.
Hi,
Can any one please tell me as to what is the exact difference between these two commands
rpm -qa php
rpm -qa | grep php
As far as I know, they both list php related info if only it is installed on the system. Right? The first command gives only php centric info, while the second one displays all the php related packages and dependencies. And it does so with the help of the grep word which is a regular expression search facility built into the os. Right? What are other command that can be used with grep? Are there any consideration to be taken into account when using it with other commands such as cat, ls, ps or yum? Thanks.....
The first will only look for a package named php (not likely to be useful). The second will query all of your rpms installed for any title that has php in it. Much more useful. The second is my preferred method for cli based rpm queries.
Bookmarks