Difference between revisions of "Lsof"
From Christoph's Personal Wiki
Line 1: | Line 1: | ||
− | |||
'''lsof''' is a [[:Category:Linux Command Line Tools|command line tool]] that is used to report a list of all open files and the processes that opened them. | '''lsof''' is a [[:Category:Linux Command Line Tools|command line tool]] that is used to report a list of all open files and the processes that opened them. | ||
Line 10: | Line 9: | ||
cron 353 root cwd VDIR 222,5 512 254550 /var -- atjobs | cron 353 root cwd VDIR 222,5 512 254550 /var -- atjobs | ||
− | == See also == | + | ==See also== |
− | * [[ | + | *[[netstat]] |
− | * [[ | + | *[[strace]] |
− | * [[List of Linux Programmes]] | + | *[[List of Linux Programmes]] |
− | == External links == | + | ==External links== |
− | * [http://www.netadmintools.com/html/lsof.man.html lsof manpage on www.netadmintools.com] | + | *[http://www.netadmintools.com/html/lsof.man.html lsof manpage on www.netadmintools.com] |
− | * Vic Abell's [http://people.freebsd.org/~abe/ homepage], author of lsof. | + | *Vic Abell's [http://people.freebsd.org/~abe/ homepage], author of lsof. |
[[Category:Linux Command Line Tools]] | [[Category:Linux Command Line Tools]] |
Revision as of 02:05, 26 April 2007
lsof is a command line tool that is used to report a list of all open files and the processes that opened them.
Open files in the system include disk files, 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.
% lsof /var COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME syslogd 350 root 5w VREG 222,5 0 440818 /var/adm/messages syslogd 350 root 6w VREG 222,5 339098 6248 /var/log/syslog cron 353 root cwd VDIR 222,5 512 254550 /var -- atjobs
See also
External links
- lsof manpage on www.netadmintools.com
- Vic Abell's homepage, author of lsof.