From The Answer Gang on Mon, 19 Jun 2000
Hi,
Is there any way to find out what package that s specific program belongs to? And where to download the source to build it? For example, I am trying to figure out how and where to find the source or package for mount program. I check the fileutils & sh-utils and can't find it within them.
Any help will be highly appreciated.
Meiji
That would be a "whence" command (which used to exist in some forms of UNIX and even in the old Yggdrasil distributions).
If you're using an RPM based system such as Red Hat, SuSE TurboLinux, etc, then you can use the following command to find the "owner" or "provider" of a given file:
rpm -qf $FILEPATH
Note that this should use the full name of the file. So in your case try:
rpm -qf $( which mount )
... (you can use backticks for the $(...) expression, this is just a less ambiguous syntax under most fonts).
On a dpkg (Debian-based) system such as Debian, Corel, Stormix, LibraNet etc, then you can use the following command:
dpkg -S $FILEPATH
... or you can simply do a grep -l /var/lib/dpkg/info/*.list
1
2
3
4
5
6
7
8
9
10
11
12
13
14 15 16 17 18 19 20 21 22 |