[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: how are "groups" implemented?



On Wed, 2003-10-22 at 07:58, David Eduardo Gomez Noguera wrote:

> Yes, you can create any group. Its all defined on the .spec file for the
> creation of the rpm.
> And I think you can do this
> strings  /var/lib/rpm/Group|grep -v root|less
> to get a list of all instaled groups. Though its very crude methode.
> You could also do 
> rpm -qai|grep -E "Group[[:space:]]:"
> but that would be a very log list with unnecessary and repeated
> information.
> Somebody will come with a more sophisticated way.

How about this ?

rpm -qa --queryformat '%{GROUP}\n'|sort|uniq -c |sort -rn

That will list all the groups used by installed RPMs, list the number of
occurrences of each, and then sort by the number.  May take a moment or
two to runn.

The "rpm --querytags" command will list the available tags for use in
--queryformat.  Queryformats are very handy for this type of thing.

--Jeremy

-- 
/---------------------------------------------------------------------\
| Jeremy Portzer        jeremyp@pobox.com      trilug.org/~jeremy     |
| GPG Fingerprint: 712D 77C7 AB2D 2130 989F  E135 6F9F F7BC CC1A 7B92 |
\---------------------------------------------------------------------/

Attachment: signature.asc
Description: This is a digitally signed message part


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]