Am Mittwoch, 24. August 2011, 23:27:46 schrieb Alex Schuster: > walt writes: > > On 08/24/2011 01:05 AM, Yohan Pereira wrote: > > > equery belongs /usr/include/plasma/service.h > > > > > > if you dont have the equery program install it by emerging > > > > > > app-portage/gentoolkit > > > > Seems there is always an alternate way of answering any portage > > question. > > I know "qfile service.h" will do the same thing (emerge portage-utils). > > > > I'll bet there are still more ways that I don't know about yet. Anyone > > have a different trick to do the same thing? > > wonko@weird ~ $ grep -r /usr/include/plasma/service.h /var/db/pkg/ > /var/db/pkg/kde-base/kdelibs-4.7.0-r1/CONTENTS:obj > /usr/include/plasma/service.h e9ddea9052c900f1f87c57025a0f36f0 1308840546 > > Emulating qfile as a shell function for nicer output: > > wonko@weird ~ $ myqfile() > > > { > > > > grep -r "$1" /var/db/pkg | sed 's#/CONTENTS:.*##g' > > > > } > > wonko@weird ~ $ myqfile /usr/include/plasma/service.h > /var/db/pkg/kde-base/kdelibs-4.7.0-r1
I would use find and grep -H instead of grep -r On my system your version greps in ~ $ find /var/db/pkg | wc -l 33791 files, while only ~ $find /var/db/pkg -name "CONTENTS" | wc -l 1182 are relevant for the problem at hand ;) > Wonko Regards, Michael