Track the files accessed by a script.

How can i track all the files accessed by script. The script is supposed to bring up my application and this script is just the main script which inturn calls another scripts and executable. I need to know all the the files this main script calls and the files accessed by all the other scripts inside the main scripts and by the all the sub scripts.

I tried using lsof but was unable to track the files opened by the child process.

All ideas are welcome.

What OS and shell are you running?

There are commands that trace execution of system calls, like truss. You want to trace the open system call.

I am using HP-UX 11.31. I tried using tusc to track read,but was unable understand the output.