3

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.

del
  • 133
  • 3

2 Answers2

8
$ strace -e trace=open /path/to/your/program 2>&1 | less
quanta
  • 51,413
  • 19
  • 159
  • 217
3

Strace

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

Rilindo
  • 5,078
  • 5
  • 28
  • 46