lsof (LiSt of Open Files) — administrator tool, command line utility to display information about which files are used by which processes.

Open the file lsof can also be a regular file, directory, network, file, block or character file, dynamic library, the usual conveyor, and many others. Thus you can use the utility to get information about any open file (as is known in the Unix and GNU/Linux se anything in this file).

lsof launched without any options displays a list of all open files in all possible processes. If you specify a file as a argument displays all processes that use this file in any way. You can specify multiple files and displays all the processes that use these files.

lsof supports the viewing of files used by each application or process ID, you can view the files opened by a specific user, you can display the files open by all users except specific. Network connection in GNU/Linux are also files, thus information about them can also be obtained by using lsof. For example, you can obtain a list of processes listening on a specific port, a list of all UDP/TCP connections and so on…

lsof allows you to view a list of processes that opened the files from a specific directory (including subdirectories), you can view the files opened by the processes that use a particular mount point. Asked options can be combined, supported the conclusion in the repeat mode, the output at a specified interval can be continued regardless of the presence of open files.

lsof is part of the standard tools of most GNU/Linux distributions, the tool or its output can be used by other applications or scripts.

License: BSD (Berkeley Software Distribution)

Home page

The utility lsof (Linux Documentation Project)

Frequently Asked Questions about lsof

Author: posixru


(Visited 244 times, 1 visits today)