http://qs1969.pair.com?node_id=519085


in reply to how to know the files opened by a process

For an OS that has a /proc, you can File::Find on the /proc/\d+/fd/ nodes. They will be a symlink to the opened files of each process currently running.

# ls -l /proc/####/fd/ total 3 lr-x------ 1 root root 64 Dec 26 02:46 0 -> /proc/kmsg lrwx------ 1 root root 64 Dec 26 02:46 1 -> socket:[11384] lr-x------ 1 root root 64 Dec 26 02:46 2 -> /boot/System.map-2.6.14-2- +k7

The intelligent reader will judge for himself. Without examining the facts fully and fairly, there is no way of knowing whether vox populi is really vox dei, or merely vox asinorum. — Cyrus H. Gordon