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?


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.


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

  • 1
    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 clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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