LWN.net Logo

Advertisement

E-Commerce & credit card processing - the Open Source way!

Advertise here

Do we need this crap on LWN?

Posted Feb 21, 2007 18:37 UTC (Wed) by foo (guest, #1117)
In reply to: Do we need this crap on LWN? by evgeny
Parent article: ESR's goodbye note

I prefer debs, too, but one thing I miss
from my RPM days is the ability to query
which package owns a particular file.

E.g.:

# rpm -qf /etc/diameter/sunping.xml
ethereal-0.10.3-15.15


(Log in to post comments)

which package owns a file

Posted Feb 21, 2007 18:50 UTC (Wed) by rfunk (subscriber, #4054) [Link]

dpkg -S /etc/diameter/sunping.xml

which package owns a file

Posted Feb 22, 2007 15:00 UTC (Thu) by foo (guest, #1117) [Link]

Great, thanks!

which package owns a file

Posted Feb 27, 2007 23:00 UTC (Tue) by cdmiller (subscriber, #2813) [Link]

Yeah but whats up with this?

dpkg -S /etc/passwd
dpkg: /etc/passwd not found.

Whereas:
rpm -qf /etc/passwd
setup-2.7.3-1mdv2007.0

which package owns a file

Posted Feb 27, 2007 23:15 UTC (Tue) by rfunk (subscriber, #4054) [Link]

That's a generated file rather than one installed from a package. (The base-passwd
package generates it, but I realize your point is about how to get that information.)

The easiest way I know to get that sort of information is to grep the files
in /var/lib/dpkg/info/.

Do we need this crap on LWN?

Posted Feb 21, 2007 19:16 UTC (Wed) by fmarier (subscriber, #19894) [Link]

To search in your installed packages:
dpkg -S /usr/lib/libxml2.so.2

To search in all packages (installed or not), first install the "apt-file" package, then run:
apt-file update
apt-file search /usr/lib/libxml2.so.2

Copyright © 2008, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds
Powered by Rackspace Managed Hosting.