10-30-2006, 07:08 PM
"OPTIONS
In the absence of any options, lsof lists all open files belonging to
all active processes.
"
$ lsof
COMMAND . PID . USER . FD . TYPE DEVICE SIZE/OFF NODE . . . . NAME
sshd . . . . 21648 dhotay cwd VDIR 14,2 . . 1428 . . . . 2 . . . . . . /
sshd . . . . 21648 dhotay 0u . VCHR 3,2 . . 0t0 . . . . . 60880004 . /dev/null
...
csh . . .. . 21649 dhotay txt . VREG 14,2 . . 347016 . . 2761. . . . . /bin/tcsh
csh . . .. . 21649 dhotay txt . VREG 14,2 . . 1793424 . 1143496 . . /usr/lib/dyld
csh . . .. . 21649 dhotay txt . VREG 14,2 . . 4398100 . 1143709 . . /usr/lib/libSystem.B.dylib
csh . . .. . 21649 dhotay txt . VREG 14,2 . . 304580 . . 1143863 . . /usr/lib/libncurses.5.4.dylib
...
The last column, under NAME, is the file that is open.
(dots added to try to preserve vertical alignment)
In the absence of any options, lsof lists all open files belonging to
all active processes.
"
$ lsof
COMMAND . PID . USER . FD . TYPE DEVICE SIZE/OFF NODE . . . . NAME
sshd . . . . 21648 dhotay cwd VDIR 14,2 . . 1428 . . . . 2 . . . . . . /
sshd . . . . 21648 dhotay 0u . VCHR 3,2 . . 0t0 . . . . . 60880004 . /dev/null
...
csh . . .. . 21649 dhotay txt . VREG 14,2 . . 347016 . . 2761. . . . . /bin/tcsh
csh . . .. . 21649 dhotay txt . VREG 14,2 . . 1793424 . 1143496 . . /usr/lib/dyld
csh . . .. . 21649 dhotay txt . VREG 14,2 . . 4398100 . 1143709 . . /usr/lib/libSystem.B.dylib
csh . . .. . 21649 dhotay txt . VREG 14,2 . . 304580 . . 1143863 . . /usr/lib/libncurses.5.4.dylib
...
The last column, under NAME, is the file that is open.
(dots added to try to preserve vertical alignment)