proc pseudo-filesystem in Linux

proc-pseudo-filesystem in Linux The Linux process pseudo-filesystem, the /proc directory. Every process on the system has a directory here with its name on it, inside of which lies many things — including an fd (”file descriptor”) subdirectory containing links to all files that the process has open. Even if a file has been removed from the filesystem, a copy of the data will be righ there:

/proc/process id/fd/file descriptor

To know where to go, you need to get the id of the process that has the file open, and the file descriptor. These you get with lsof, whose name means “list open files.” (It actually does a whole lot more than this and is so useful that almost every system has it installed. If yours isn’t one of them, you can grab the latest version straight from its author.)

lsof - list open files

Trackback URI | Comments RSS

Leave a Reply

You must be logged in to post a comment.