check if a file belongs to specific rpm +
Recently I had a client who needed a Searchlight install. I had to work with his admin who did not wanted to give me root access, because it was not included into support plan. In other words, they did not allowed anyone to edit anything into server. Since they failed to follow few basic instructions, my client convinced them to allow me take over the install, with root access. That is where I had the nice surprise that several basic functions were not installed.
The fun part was to find out what RPM’s I needed to install, for all missing functions and libraries. Than, I remembered how good the rpm package is to do exactly what I need.
For example, if I want to find in what RPM the service function is present, all I have to do is run this command:
$ rpm -qf /sbin/service
Is that simple. I hope it helps someone else out there.