in reply to how can i find whether a file has been opened by some other process across a network(not in a single machine)?

> I need a way to find out whether a file has been open by some other process on any machine

In general, you can't. You'll have to do something cooperative, like have every program agree to use a lock file.

It might be sufficient just to wrap accesses to the file with something like this:

# file: vilock perl -MFile::NFSLock -e ' $fname = shift; $lock = File::NFSLock->new($fname,"BLOCKING") or die $!; system $ENV{EDITOR}, $fname ' your-important-file
  • Comment on Re: how can i find whether a file has been opened by some other process across a network(not in a single machine)?
  • Download Code