I need to lock a file in unix/linux OS. I have googled and read about java.nio.channels Filelock and Reentrant File Lock . But both works in Windows but not in unix. Is there any other way of implementing a lock on file in unix? Any sample code would be highly appreciated.
Thanks, Vignesh