Dave's Brain

Browse - computer tips - linux what files does that process have open

Date: 2010mar7
OS: Linux

Q.  How can I see what files a process has open?

A.  Here are two commands that do that:

	ls -l /proc/<pid>/fd

	lsof -p <pid>

where <pid> is the unique process id.
Many processes will have special files stdin, stdout and stderr open.
What this info useful to you? You can donate to say thanks

Add a comment

Sign in to add a comment
Copyright © 2008-2012, dave - Code samples on Dave's Brain is licensed under the Creative Commons Attribution 2.5 License. However other material, including English text has all rights reserved.
Advertisements: