in reply to Finding out by one process a filename opened by another process.
If you have the PID, then the shell command lsof -p will list all files opened by that PID. Also, lsof <filename> will list the processes that have opened a specific file. Etc.
lsof is a very powerful command, and it requires root access, so you'll have to provide password-less sudo access for the user executing the script in order for this solution to work.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Finding out by one process a filename opened by another process.
by Jeppe (Monk) on Aug 01, 2012 at 10:52 UTC | |
by humble (Acolyte) on Aug 01, 2012 at 15:52 UTC | |
|
Re^2: Finding out by one process a filename opened by another process.
by humble (Acolyte) on Aug 01, 2012 at 15:46 UTC |