is file open in system ? - other than lsof
paul
paul at subsignal.org
Sat Apr 19 11:31:14 EDT 2008
bvidinli schrieb:
> is there a way to find out if file open in system ? -
> please write if you know a way other than lsof. because lsof if slow for me.
> i need a faster way.
> i deal with thousands of files... so, i need a faster / python way for this.
> thanks.
I think you can do this with inotify. It's an event based notification
mechanism for linux kernel 2.6.13 and up. It has python bindings
available (google for pyinotify).
You will receive events like IN_OPEN,IN_CLOSE,etc. and keep track of
opened files this way.
hth
Paul
More information about the Python-list
mailing list