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

Re: get package name from file name



On 07/07/11 at 09:43pm, Wolodja Wentland wrote:
> On Thu, Jul 07, 2011 at 13:39 +0100, kuLa wrote:
> > On 07/07/11 13:17, Wolodja Wentland wrote:
> > > As always there are multiple to do this :)
> > > 
> > >     * dpkg -S /path/to/file
> > >     * apt-file search /path/to/file
> > >     * dlocate -S /path/to/file
> > > 
> > > I prefer to use either apt-file or dlocate. The former comes in quite handy as
> > > it also works for packages that are not installed and it supports regular
> > > expressions. If you are looking for an executable, but don't know the full
> > > path you can search for:
> > > 
> > >     $ apt-file search -x "bin/foo$"
> > > 
> > > which will find all files named "foo" that are in a bin/ directory somewhere.
> > > In particular this will not match "bin/foobar". dlocate on the other hand is a
> > > bit faster than "dpkg -S" and has other goodies too ... have a look.
> 
> > Yeee, many ways to the same goal but dlocate or apt-file aren't present
> > in Debian by default like dpkg is :-)
> 
> Sure, but that applies for a lot of software. :) I typically don't have a
> problem to install packages I want, but YMMV.

You make good points but it is always a useful policy to familiarize yourself
with, and make a habit of recommending the packages guaranteed to be installed
for portability/reliability.

Also some of us are somewhat OCD and hate having ten packages installed with
overlapping featuresets :P

-- 
Liam

Attachment: signature.asc
Description: Digital signature


Reply to: