[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: dpkg / apt equivalent to 'rpm -qf'?

On Tue, Aug 24, 2004 at 09:44:33PM +1000, Paul Gear wrote:
> Hi folks,
> What is the canonical method for determining to which package an
> installed file belongs?  dpkg -S seems to be the right *sort* of thing,
> but doesn't always work:
> enoch:/share/download # dpkg -S /etc/apt/apt.conf.d/70debconf
> debconf: /etc/apt/apt.conf.d/70debconf
> enoch:/share/download # dpkg -S /etc/apt/sources.list
> dpkg: /etc/apt/sources.list not found.
> enoch:/share/download # dpkg -S /etc/gpm.conf
> dpkg: /etc/gpm.conf not found.

It's doing *exactly* what you asked of it. Remember that dpkg -S will only
work for files that were *in* a package initially and not ones that were
*created*. /etc/apt/sources.list is created by apt-setup from 'base-config',
but does not reside in any package.

-- Thomas Adam

"Frankly, Mr. Shankly, since you ask. You are a flatulent pain in 
the arse." -- Morrissey.

Reply to: