Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I've found strace | grep "open" particularly useful for locating config files. They're usually opened right at the start of the program as well.

(For reference, strace prints out every system call used by a program with the arguments that were called; occasionally, a program may use something other than `open` or `fopen` to read in a file, so that should be kept in mind when using this method)



strace has its own filtering mechanism, so you can do `strace -e open`. Though you might have to add `,openat,openat2` so maybe your way is easier in practice.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: