LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 11-12-2005, 08:40 AM   #1
yadu
LQ Newbie
 
Registered: Nov 2005
Posts: 5

Rep: Reputation: 0
Finding the owning package of a file


How can I find the name of the package that owns a given file in Debian? That is, is there an option in dpkg that is equivalent to the command 'rpm -qf <filename>'? (If you don't know what this does, an example would be say, running 'rpm -qf /boot/vmlinuz' would give the output "/boot/vmlinuz belongs to package kernel-default-2.6.12-1").

The man page for dpkg didn't help. Or should I be looking at something other than dpkg? Thanks for any pointers.
 
Old 11-12-2005, 09:03 AM   #2
dastrike
Member
 
Registered: Apr 2004
Location: Stockholm, Sweden
Distribution: Debian 'sid'
Posts: 250

Rep: Reputation: 30
dpkg -S somefile

Example: what package provides /boot/vmlinuz-2.6.12-1-k7 ?
Code:
$ dpkg -S /boot/vmlinuz-2.6.12-1-k7
linux-image-2.6.12-1-k7: /boot/vmlinuz-2.6.12-1-k7
And the answer is: linux-image-2.6.12-1-k7


And on the same subject one can do the opposite as well: what files does a package provide: In that case one would use
dpkg -L somepackage

Note that dpkg can only perform these operations regarding installed packages. For digging in package content listings for packages that aren't installed it can be easiest to use e.g.: http://www.debian.org/distrib/packages#search_contents

Last edited by dastrike; 11-12-2005 at 09:08 AM.
 
Old 11-12-2005, 09:09 AM   #3
yadu
LQ Newbie
 
Registered: Nov 2005
Posts: 5

Original Poster
Rep: Reputation: 0
Awesome! Thanks.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
owning joker1000 Linux - Software 5 11-29-2005 03:44 PM
Finding a precompiled package jkh Arch 8 11-20-2005 12:13 PM
Mysql Compilation/Package Finding waynejkruse10 Linux - Software 1 08-29-2005 04:59 PM
Package Management not finding CD rfk Linux - General 2 10-05-2004 06:43 PM
Installed file conflicts with file from package XFree86-4.1.0-26 LinuxOff Linux - Software 2 09-06-2004 02:00 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 04:46 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration