WordPress package

sktsee sktsee at tulsaconnect.com
Mon Apr 16 16:03:34 UTC 2007


On Mon, 16 Apr 2007 06:52:27 +1000, Peter Garrett wrote:

> On Sun, 15 Apr 2007 20:12:17 +0200
> Nils Kassube <kassube at gmx.net> wrote:
> 
>> dpkg -l|while read i n r;do apt-cache madison $n|grep universe;done|cut
>> -d\| -f1
> 
> I get duplicate lines from the output here - what about something like
> 
> for each in $(dpkg --get-selections | grep install | cut -f1) ; do
> apt-cache madison $each | grep universe ; done | cut -d\| -f1 |  sort |
> uniq > universe-installed.list
> 
> "time" reports
> real    5m52.071s
> user    3m26.669s
> sys     2m21.925s
> 
> Comparison:
> 
> $ time dpkg -l|while read i n r;do apt-cache madison $n|grep
> universe;done|cut -d\| -f1 | sort | uniq > dpkg-universe
> 
> real    6m3.550s
> user    3m28.509s
> sys     2m21.753s
> peter at prospero:~ $ diff dpkg-universe universe-installed.list
> peter at prospero:~ $
> 
> So it looks like both give the same result ...
> 
> There must be a quicker way though :-)
> 
> Peter

There is :)

$ time aptitude search ~i -F '%30p %35v %25s'

real    0m4.286s
user    0m1.996s
sys     0m0.128s

-- 
sktsee











More information about the ubuntu-users mailing list