I am trying to determine which files a process creates when it runs. I know that I can list the file handles of a currently running process by looking in /proc or using lsof. However, the problem is that the program finishes in less than a second. Is there any way I can get the list of files it opened when it ran? I am using CentOS.

link|improve this question
feedback

2 Answers

up vote 6 down vote accepted
$ strace -e trace=open /path/to/your/program 2>&1 | less
link|improve this answer
Works perfectly, thanks! – del Jul 29 '11 at 5:14
feedback

Strace

http://linux.die.net/man/1/strace

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.