Re: testing for open files or volumes (Alex Reynolds)
Re: testing for open files or volumes (Alex Reynolds)
- Subject: Re: testing for open files or volumes (Alex Reynolds)
- From: Peter Dyballa <email@hidden>
- Date: Wed, 04 Dec 2002 22:50:51 +0100
Hello!
Take a look into the sources of lsof -- list open files. At least
Jaguar/Mac OS X 10.2.2 has it compiled as /usr/sbin/lsof.
lsof also finds open network communication points (but I'm usually
off-line).
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
loginwind 344 pete 7r VREG 14,10 528168 33047
/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/Resources/German.lproj/Localized.rsrc
loginwind 344 pete 8w VREG 14,10 24716 961708
/private/var/tmp/console.log
loginwind 344 pete 9u VCHR 5,0 0t24679 34881284 /dev/ptyp0
loginwind 344 pete 10u VCHR 4,0 0t0 34881412 /dev/ttyp0
loginwind 344 pete 11r VREG 14,10 261 5664 /
(/dev/disk0s10)
loginwind 344 pete 12r VREG 14,10 33908 655554 /
(/dev/disk0s10)
loginwind 344 pete 13r
0x0209639c file struct, ty=0x3, op=0x2db174
pbs 362 pete cwd VDIR 14,10 6016 2 /
(/dev/disk0s10)
pbs 362 pete 0u VCHR 0,0 0t76 34763524 /dev/console
pbs 362 pete 1u VCHR 0,0 0t76 34763524 /dev/console
pbs 362 pete 2u VCHR 0,0 0t76 34763524 /dev/console
Dock 365 pete cwd VDIR 14,10 6016 2 /
(/dev/disk0s10)
Dock 365 pete 0r VCHR 3,2 0t0 34763012 /dev/null
Dock 365 pete 1w VCHR 0,0 0t0 34763524 /dev/console
LaunchCFM 21523 pete 9r unix 0x022eeea8 0t0 ->0x022ee10c
LaunchCFM 21523 pete 10w unix 0x022ee10c 0t0 ->0x022eeea8
LaunchCFM 21523 pete 11u VREG 14,10 503956 384214
/Applications/Netscape 7e/Netscape.app/Contents/MacOS/Component Registry
LaunchCFM 21523 pete 12u unix 0x022eff68 0t0 ->0x022f06bc
Some snippets ...
--
Greetings
Pete
_______________________________________________
darwin-kernel mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/darwin-kernel
Do not post admin requests to the list. They will be ignored.