XP is just a number | |
PerlMonks |
file informationby hotshot (Prior) |
on Jan 01, 2002 at 20:18 UTC ( [id://135516]=perlquestion: print w/replies, xml ) | Need Help?? |
hotshot has asked for the wisdom of the Perl Monks concerning the following question:
Hi guys ! Is there a perl module to help me know if a certain file is currently open for editing by another application/editor? I'm implementing a locking mechanizm for files that are in use by our system. as long as these files are edited through my program and shell I support, everyting is ok, but if someone edits files maually (through unix, with vi for example) I have trouble to know that, I can use ps to know if the file '/tmp/foo' is opened in vi, but I can't cover all cases, especially since there are a lot of editors, and the paths are not always absolute (you can do vi /tmp/foo, or vi foo from /tmp). anyone has a suggetions? Hotshot
Back to
Seekers of Perl Wisdom
|
|