Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

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

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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