Developer(s) Victor A. Abell Platform Cross-platform | Written in C License BSD license-compatible | |
Stable release 4.89 / 7 June 2015 (2015-06-07) Operating system |
lsof is a command meaning "list open files", which is used in many Unix-like systems to report a list of all open files and the processes that opened them. This open source utility was developed and supported by Victor A. Abell, the retired Associate Director of the Purdue University Computing Center. It works in and supports several Unix flavors.
Contents
Examples
Open files in the system include disk files, named pipes, network sockets and devices opened by all processes. One use for this command is when a disk cannot be unmounted because (unspecified) files are in use. The listing of open files can be consulted (suitably filtered if necessary) to identify the process that is using the files.
To view the port associated with a daemon:
From the above one can see that "sendmail" is listening on its standard port of "25".
One can also list Unix Sockets by using lsof -U
.
Lsof output
The lsof output describes: