I wholeheartedly agree with this blog post. I believe someone on here yesterday was asking about config file locations and setting them manually. This is in the same vein. I can't tell you how many times a command line method for discovering the location of a config file would have saved me 30 minutes of googling.

you are viewing a single comment's thread
view the rest of the comments
[–] 8 points 3 years ago (13 children)

(Windows) Resource Monitor, disk tab, tick the process, see what files it opens and closes.

Also the usual %programdata% and the two %appdata% find most things.

  • source
  • hideshow 13 child comments
  • [–] 3 points 3 years ago (2 children)

    Unless it's using the Registry for some config values.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 3 points 3 years ago (8 children)

    The *nix equivalent is the lsof command. This doesn't help you finding out in which hierarchy config files are parsed when the program accesses multiple ones, which is often the case.

  • source
  • parent
  • hideshow 8 child comments
  • [–] 7 points 3 years ago (7 children)

    You can use something like strace -eopen -f -o strace.out the_program to find all files that the program tried or succeeded to open. Then you can try to find the config file(s) in strace.out.

  • source
  • parent
  • hideshow 7 child comments
  • [–] 2 points 3 years ago (4 children)

    You still don't know which location is preffered and how get they get merged. In my experience, digging into the source is the most straighforward. But my usual problem is more that the config option doesn't do at all what the documentation says it does.

  • source
  • parent
  • hideshow 4 child comments
  • [–] 1 point 3 years ago* (3 children)

    Wouldn't the strace.out file be in chronological order?

  • source
  • parent
  • hideshow 3 child comments
  • [–] 1 point 3 years ago (2 children)

    Yes, though if two different files allow for the same config key - you're stuck opening both to check

  • source
  • parent
  • hideshow 2 child comments