dannyman.toldme.com


FreeBSD, Linux, Technical

pkg_info -W == rpm -qf

Aye. So, let us say you want to know what package a file comes from.

On FreeBSD:

0-17:16 djh@web3 ~> find /var/db/pkg -name +CONTENTS | xargs grep -l pdftex
/var/db/pkg/teTeX-1.0.7_1/+CONTENTS

Ugly, eh? Which, I think the portinstall stuff has a pkgwhich command.

Update: On FreeBSD, one may use:
pkg_info -W `which pdftex`

Linux?

[root@novadb0 pdftex-1.30.5]# rpm -qf /usr/bin/pdftex
tetex-2.0.2-22.EL4.4

Schweet!

Read More

Next:
Previous:
Categories: FreeBSD, Linux, Technical

  • Schweet indeed! Thanks for sharing. I can see this can be very handy.

    I’ve always have the impression of FreeBSD being the same as Linux, with some cosmetic differences here and there. It looks like I need to adjust that thinking a bit;)

  • dbt

    You forgot | xargs -n 1 dirname

  • mangala

    how about pkg_info -W filename ?