Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Is it possible to identify files in use?
#4
"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)
Reply


Messages In This Thread
Re: Is it possible to identify files in use? - by Donkey Hotay - 10-30-2006, 07:08 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)