Pages

Friday, June 29, 2012

Files Opened By Application


In Order to find the files that are opened by an application we can use the lsof command like,

[root@vx111a bin]# lsof +f  | head

COMMAND    PID      USER   FD    TYPE   DEVICE     SIZE       NODE NAME
init         1      root   cwd     DIR    8,8     4096         2             /
init         1      root   rtd       DIR    8,8     4096        2             /
init         1      root   txt       REG   8,8     38652      11370583  /sbin/init
init         1      root   mem    REG   8,8     129900    918498     /lib/ld-2.5.so
init         1      root   mem    REG   8,8     1693796  918499     /lib/libc-2.5.so
init         1      root   mem    REG   8,8     20668     918500      /lib/libdl-2.5.so
init         1      root   10u      FIFO  0,17                  1320       /dev/initctl