OverView
lsof
list all open files
- to list all open files
lsof
- to list opened files by process belong to specific user
lsof -u [username]
- list opened files based on their internet address
lsof -i 4
lsof -i 6
- list opened files based on specific pid
lsof -p [pid]
lsof -p [^pid], use ^ means exclude the pid
- list pids which process open the specific file
lsof -t [filename with path]
- limit lsof to a directory
lsof +D [directory]
- list all internet and x.25 network files
lsof -i 没有参数
- list all opened files based on port range
lsof -i :1-1024
- list all opened files based on type of connection (tcp/udp)
lsof -i udp
- list parent pid of the process
lsof -p [pid] -R
attention, use "-R"
网友评论