With binaries, I can always do
which foo to know which binary I am invoking with
$ foo, but what about man pages? Is there a way to know the path of the man page will be loaded by default?
Similarly, what about dynamic libraries? Is there any to find out the path of the
.so file that will be loaded for a given library name?
I just learned about pkg-config, but I didn't see an option to ask it to output paths. Also, it looks like it requires having
.pc files that specify paths. Still is this something that could help with this problem?