I have a program that I have compiled for a Linux server. It was written in FORTRAN, although I don't think that is particularly relevant to the question.
At some point, the program spits out open: No such file or directory
And then terminates.
The issue is I have no idea what file/directory the program is attempting to open.
It would be really great if there was some kind of program, a bit like ldd (but not quite) which could be run to show what files a binary executable is attempting to open.
Does such a thing exist? If not is there a way to obtain such information from the Linux kernel?
man strace
In your case strace -e openat $YOURPOGRAM.
There is a program called strace which can do this
strace -f -e open <exe>
See https://linux-audit.com/monitor-file-access-by-linux-processes/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With