Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Find which package owns a file
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
madman420
n00b
n00b


Joined: 13 Oct 2009
Posts: 15
Location: NorthWest US

PostPosted: Thu Nov 26, 2009 3:23 am    Post subject: Find which package owns a file Reply with quote

I'm trying to find which package owns a file and qpkg -f /path/file keeps popping up in websearches, but the qpkg installed on my system seems only to support features related to installing binary packages and returns an error.

How do I find which package a particular file belongs to on a fairly modern Gentoo system?

Thanks.
Back to top
View user's profile Send private message
MotivatedTea
Apprentice
Apprentice


Joined: 06 Nov 2006
Posts: 269
Location: Toronto, Canada

PostPosted: Thu Nov 26, 2009 3:28 am    Post subject: Reply with quote

Code:
equery belongs /path/file

That will search for all packages that own the file. Unless there were conflicts during the install, files are normally owned by a single package. In that case, it's faster to do:
Code:
equery belongs -e /path/file

which is exactly the same, except that it stops as soon as it finds a match. See "man equery".
Back to top
View user's profile Send private message
Mike Hunt
Watchman
Watchman


Joined: 19 Jul 2009
Posts: 5287

PostPosted: Thu Nov 26, 2009 4:12 am    Post subject: Reply with quote

... or for a really speedy way, emerge app-portage/portage-utils and run
Code:
qfile qfile
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum