4 ms·
Doesn't the man page often list several potential locations where it looks for the file and the ordering behavior, leaving you to investigate and find which is
by BaculumMeumEst 3y ago
Doesn't the man page often list several potential locations where it looks for the file and the ordering behavior, leaving you to investigate and find which is actually loaded? It's still annoying.
- p-e-w 3y agoBut that is exactly the information you need in order to determine which config file is being read in all situations. A single location doesn't cut it if the reality is more complicated. If the goal is to find out which particular file is being used at this particular time, on this particular system, the maximum verbosity log might have that information, and otherwise strace can help, as described in the other comments.
- eptcyka 3y agoI really do not care about all the possible paths a config file might be read from. I want a flag that I can pass to a binary to see which paths it will actually read, and ideally, I'd like those paths to be logged to STDOUT on startup.
- em-bee 3y agobut it reads all of them in a particular order and in case of conflicting settings you have to figure out which one takes precedence.
- eptcyka 3y agoYes, I want to know which files in which order.cI don't want a static list of all possible locations, I want it to deduce what files would take effect in a given environment and with the given config files - a program must already know this when it is ran - so let's just be open and print said paths.
- Joker_vD 3y agoAbsolutely. For example, if you pass "-v" to ssh, it prints paths to configs that it tried to open, paths to identity files that it tried to open, to known_hosts files, etc. This info is not needed so very often, but when it is, it's incredibly useful.
- _dain_ 3y agoYes. Exactly. Which is why the program should tell you which one takes precedence. The program already knows what config files it's loading and in what order, so why is it left up to the human to do all that work again? There should be a flag like --manifest or something that would spit out what actually got loaded from where.
- coldtea 3y agoThat would be stderr but hell yes
- coldtea 3y agoThese Stockhom Syndrome rationalizations are the reason we can't have nice things
- lelanthran 3y agoOkay, but why should I have to determine what the program already knew?