[CentOS] is yum a complete substitute of rpm?

Mon Feb 15 16:46:49 UTC 2010
Peter Kjellstrom <cap at nsc.liu.se>

On Monday 15 February 2010, Bowie Bailey wrote:
> Jim Green wrote:
> > On 13 February 2010 10:27, Robert P. J. Day <rpjday at crashcourse.ca> wrote:
> >> On Sat, 13 Feb 2010, Jim Green wrote:
> >>
> >>
> >>  $ rpm -qa                     # list all installed packages
> >
> > yum list installed
>
> I use rpm for basic stuff because it runs faster.  For example:
>
> $ time yum list installed
> ...
> real    0m17.069s
> user    0m0.857s
> sys     0m0.675s
>
> $ time rpm -qa
> ...
> real    0m4.714s
> user    0m4.457s
> sys     0m0.120s

A nice twist is that "-qa" can be extened to "-qa --last" to get the output 
sorted on install date (or you can have any format you want with --qf like a 
previous poster suggested).

/Peter
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.centos.org/pipermail/centos/attachments/20100215/3624d8c4/attachment-0005.sig>