Search for filenames

Anything that pertains to Entropy, Equo or Sulfur

Moderator: Moderators

Search for filenames

Postby Marcus » Thu Apr 19, 2012 14:02

I am looking for a way to find out which package contains a specific filename:

Code: Select all
equo query belongs /usr/sbin/ntpdate


works, but I need to know the path to the binary, as

Code: Select all
equo query belongs ntpdate


does not seem to work.

I know e-file, too. But it does not seem to have the ability to search in overlays.

Greets
Marcus
Marcus
Baby Hen
 
Posts: 6
Joined: Thu Apr 19, 2012 13:58

Re: Search for filenames

Postby Fitzcarraldo » Thu Apr 19, 2012 14:46

Code: Select all
fitzcarraldo@meshedgedx ~ $ whereis ntpdate
ntpdate: /usr/sbin/ntpdate /usr/man/man8/ntpdate.8.bz2 /usr/share/man/man8/ntpdate.8.bz2
fitzcarraldo@meshedgedx ~ $

The whereis command will find you the path to the binary.
User avatar
Fitzcarraldo
Sagely Hen
 
Posts: 7333
Joined: Sat Mar 10, 2007 5:40
Location: United Kingdom

Re: Search for filenames

Postby Marcus » Thu Apr 19, 2012 15:32

I meant packages that are actually not installed.
Marcus
Baby Hen
 
Posts: 6
Joined: Thu Apr 19, 2012 13:58

Re: Search for filenames

Postby Fitzcarraldo » Thu Apr 19, 2012 20:07

Entropy packages are bz2 tarballs aren't they? So you could use the locate command:

Code: Select all
locate ntpdate | grep bz2

To use the locate command you need to have the package mlocate installed and its hash file updated with the list of files currently on your machine:

Code: Select all
equo install mlocate
updatedb


Thus, even if the package is not installed but only the tarball downloaded, you'd find out where the tarball is.
User avatar
Fitzcarraldo
Sagely Hen
 
Posts: 7333
Joined: Sat Mar 10, 2007 5:40
Location: United Kingdom

Re: Search for filenames

Postby Marcus » Thu Apr 19, 2012 20:26

I guess it's still not really clear.

For example, I want to install nslookup, but don't know which package it provides. How can I figure out, which package (that is not installed, yet) contains the binary, without knowing the full path to it (as equo query belongs only seems to handle full path)

Greets
Marcus
Marcus
Baby Hen
 
Posts: 6
Joined: Thu Apr 19, 2012 13:58

Re: Search for filenames

Postby Fitzcarraldo » Thu Apr 19, 2012 21:53

To find out the name of the package Y which contains the not-installed program X, you can use the Portage File List, and you ought to install the package app-portage/pfl to help them keep the on-line list up to date.

Taking your example of nslookup, http://www.portagefilelist.de/site/quer ... ges=yes&do tells me that nslookup is part of the package net-dns/bind-tools.
User avatar
Fitzcarraldo
Sagely Hen
 
Posts: 7333
Joined: Sat Mar 10, 2007 5:40
Location: United Kingdom

Re: Search for filenames

Postby Stupot » Thu Apr 19, 2012 22:20

Wow. That is actually pretty nifty. I'll be making a note of this thread.
Stupot
Sagely Hen
 
Posts: 1011
Joined: Wed Feb 14, 2007 3:44
Location: St. Louis, MO, USA


Return to Entropy|Equo|Rigo Package Managers

Who is online

Users browsing this forum: No registered users and 0 guests