How do I tell lsof I need to list only physical files (not sockets, not TCP/IP connections, only physical files)?
Linux – Restrict lsof Output to Physical Files Only
linuxlsof
Related Topic
- Bash – lsof for files opened by other users
- How to lsof report a higher number of open files than what ulimit says should be allowed
- Vps – “Too many open files in system” on VPS with LSOF far from MAXFILES
- Custom lsof Output – How to Generate
- Ubuntu – How to kill/close log files that are open through lsof grep deleted
Best Answer
Just looked through some man pages, it appears you use the command:
This will list all open files in the / directory, which is everything on a Linux filesystem. Just tested and it shows only REG and DIR.
More examples:
0-999 limits it to files with a file descriptor number.