You could use truss
(similar to strace
on Linux) for this.
truss scriptA.ksh 2>&1 | grep open
You'll have to sift through some unrelated calls to open()
, but your log files will be in there.
Also, truss
can attach to existing processes by using the -p
switch.
Note: I speak from experience with strace
, but it looks like this all holds for truss
...