Tuesday, August 17, 2010

lsof command - whos doing what

lsof will show list of open files

#lsof
[root@rock ~]# lsof | more
COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME
init 1 root cwd DIR 8,5 4096 2 /
init 1 root rtd DIR 8,5 4096 2 /
init 1 root txt REG 8,5 38620 6422543 /sbin/init
ncftpput 15940 root 3u IPv4 16636687 TCP rock.transfer.my:47940->10.10.10.115:ftp (ESTABLISHED)

Show all open tcp files
#lsof -i TCP


#lsof -i -P | grep sshd

To see list of open files
#lsof -i -U

No comments:

Post a Comment