Prasad Pillarisetti wrote:
Guys recently I had this question asked in a technical interview.
How do I find out the package owning a particular file, when no package managers are installed?
If it was a system using deb packages, you could go to /var/lib/deb and search there I think.
I am assuimg SRPMs are used to install the software?
rpm is not the only packaging system available. Is the question generic or related to a particular flavour of Unix/Linux?
Is this actually possible? Install the Linux OS without a package manager?
Linux is a kernel. If floppy based Linux distributions are anything to go by, I would say yes.
I know "rpm -qf filename" gives the package owning the file. But how to get the package name when I don't have any package manager?
Depends on the packaging system. Never tried looking inside /var/lib/rpm files...
Maybe this was a question to rattle me?
Or the interviewer is very savvy.