469,271 Members | 1,014 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,271 developers. It's quick & easy.

Re: is file open in system ? - other than lsof

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

Jun 27 '08 #1
0 910

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

11 posts views Thread by Ignacio X. Domínguez | last post: by
3 posts views Thread by Thomas Bartkus | last post: by
9 posts views Thread by Mark | last post: by
19 posts views Thread by Lee Crabtree | last post: by
4 posts views Thread by MikeJ | last post: by
5 posts views Thread by bvidinli | last post: by
13 posts views Thread by writeson | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.