RPM query the package owning

-f <file> — Query the Package Owning <file>

How many times have you found a program sitting on your system and wondered “what does it do?” Well, if the program was installed by RPM as part of a package, it’s easy to find out. Simply use the -f option. Example: You find a strange program called ls in /bin (Okay, it is a contrived example). Wonder what package installed it? Simple!

# rpm -qf /bin/ls fileutils-3.12-3 #