LWN.net Logo

which package owns a file

which package owns a file

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

dpkg -S /etc/diameter/sunping.xml


(Log in to post comments)

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/.

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds