Results 1 to 3 of 3

Thread: Difference between these two commands

  1. #1

    Difference between these two commands

    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.....

  2. #2
    Moderator
    Good Guru
    Schotty's Avatar
    Join Date
    Jul 2001
    Location
    Milwaukee, WI
    Posts
    5,760
    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.

  3. #3
    Quote Originally Posted by Schotty View Post
    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.
    Very good reply, thanks mate...

Similar Threads

  1. What's the difference??
    By SRT in forum Linux - Software, Applications & Programming
    Replies: 2
    Last Post: 01-13-2012, 07:44 AM
  2. Difference in UPS VAs?
    By Compunuts in forum General Chat
    Replies: 2
    Last Post: 11-10-2005, 05:32 AM
  3. The Linux Difference
    By beezlebubsbum in forum General Chat
    Replies: 13
    Last Post: 07-28-2004, 09:48 PM
  4. Difference between .src.rpm & .tar.gz packages
    By in forum Linux - General Topics
    Replies: 4
    Last Post: 10-14-2003, 06:39 PM
  5. Difference in programming??
    By in forum Programming
    Replies: 11
    Last Post: 07-04-2003, 08:03 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •