LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Package name from application name (https://www.linuxquestions.org/questions/linux-software-2/package-name-from-application-name-4175454334/)

eldiener 03-16-2013 11:16 AM

Package name from application name
 
Given an application name is there some command to determine from what package the application has been installed ? Using RPM ? Using APT ?

malekmustaq 03-16-2013 12:45 PM

Quote:

Originally Posted by eldiener (Post 4912922)
Given an application name is there some command to determine from what package the application has been installed ?

I don't know what distro you are running but I assume you are talking about your running system, you should know what packaging your distro is using. To know which package installed it, usually there is a package folder (record) in the /var. In my slackware it looks exactly /var/log/packages/, you can search what it looks like in your system:

Code:

find /var -type d -iname \*package*
In my system to find out which package installed certain application binary is easy. Let us say we want to know what package installed an application called 'minicom' --
Code:

grep -li bin/minicom /var/log/packages/*
and it will return the identity of the package what installed the 'minicom'. Now to find out all (what) files this package installed into the system--

Code:

cat /var/log/packages/minicom*
should list down all what particular package has added into the system.

Hope that helps.

colucix 03-16-2013 02:44 PM

On RPM based systems:
Code:

rpm -qf `which command`
or
Code:

rpm -qf /path/to/file
On DEB based systems:
Code:

dpkg -S `which command`
or
Code:

dpkg -S /path/to/file

eldiener 03-17-2013 11:14 AM

Quote:

Originally Posted by colucix (Post 4912991)
On RPM based systems:
Code:

rpm -qf `which command`
or
Code:

rpm -qf /path/to/file
On DEB based systems:
Code:

dpkg -S `which command`
or
Code:

dpkg -S /path/to/file

Much thanks ! That is what I was looking for.


All times are GMT -5. The time now is 08:41 AM.