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
Possibly-Related Posts

Responses

December 8th, 2005

The Ji Village News

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;)

December 8th, 2005

dbt

You forgot | xargs -n 1 dirname

July 4th, 2007

mangala

how about pkg_info -W filename ?

Comment

Leave a comment . . .

Tiny Print:

  1. For private messages, e-mail me: dannyman@toldme.com.
  2. You must provide an e-mail address.
  3. You can use a bogus e-mail address, but I like to know who you are.
  4. I will not spam you. I will not publish or share your e-mail address.
  5. First-time commenters will be held for review.
  6. You can use these HTML tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>