Identify the files opened a particular process on linux
问题 I need a script to identify the files opened a particular process on linux To identify fd : >cd /proc/<PID>/fd; ls |wc –l I expect to see a list of numbers which is the list of files descriptors' number using in the process. Please show me how to see all the files using in that process. Thanks. 回答1: The command you probably want to use is lsof . This is a better idea than digging in /proc , since the command is a more clear and a more stable way to get system information. lsof -p pid However,