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

Re: eliminate subwords in dpkg --search?



On Tue, 2002-10-08 at 15:09, Marcel Fehr wrote:
> hi there
> 
> How do I search for a explicied pattern within all my installed packages?
> 
> for e.g if I want to look which package owns the command cu, a "dpkg -S cu"
> will list all package where's a pattern starting with cu (cups, custom, ... 
> same
> as I would do "dpkg -S cu*"). Is there a way to limit that?

It seems you need at least one asterisk at the beginning or the end of
your pattern, else an asterisk is appended *and* prepended to your
pattern.

You get better results whith 'dpkg -S \*cu' for example because this
just matches at the end of a file name.
 
> And is it possible to shapen the scope so that it looks
> into all available packages on the installation medium rather
> into the installed ones only?  Would avoid to check
> http://www.debian.org/distrib/packages#search_contents all the times :).

Just install apt-file. Then just run 'apt-file search cu' (make sure you
ran 'apt-file update' at least once before).

You may also want to check out grep-dctrl which should do something like
that also, but I haven't used it so far.

-- 
Claudio Bley                                 ASCII ribbon campaign (")
Debian GNU/Linux advocate                     - against HTML email  X 
http://www.cs.uni-magdeburg.de/~bley/                     & vCards / \



Reply to: