문제

I am writing simple program for my Ubuntu 10.04. I want to see which files were used by processes. Where I can see what file was requested by the process?

도움이 되었습니까?

해결책

I don't know of any log files which list past files that had been opened by a process but I know of a couple ways to determine what files a process opens.

Using strace (system call trace) you can find out what files a program opens:

strace -e trace=open <path_to_executable>

You could also try using lsof (list open files) to determine what files are currently open by running processes.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top