Super User is a question and answer site for computer enthusiasts and power users. 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 know lsof, which shows me the files opened by a running process, but if I launch a command, like calendar, that terminates immediately.

How can I see what config files are read?

share|improve this question

I would use strace -efile calendar for this. The resulting output is a little hard to read, but it shows every file-related action, including failed attempts at opening files and uses of 'stat' to see if a file exists.

share|improve this answer

I use find -mmin -2 or find -amin -2 to see which files were concerned by a command.

share|improve this answer
This only works if the atime is recorded, which is often not the case. Also, how exactly would you see which command opened a file returned by find? – slhck Dec 13 '12 at 9:24
It's a raw technique but I launch find etc before and after the command so I can see what change. I agree it's not precise but it often help. – breard Dec 13 '12 at 12:54

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.