Happy-the-monk has asked for the wisdom of the Perl Monks concerning the following question:
Dear brethren in Perl,
What would a perl hacker do to determine if a file is currently being written to?
I am looking for guidance on behalf of a collegue.
He needs help debugging a beta release of an FTP server on a whacky unix machine.
For some reason yet unknown to us, the Unix (Solaris 9) isn't allowing the FTP server to run the fuser() command on its own files - alas, we aren't system administrators there. (The FTP daemon is running as a non-privileged user)
fuser() is what different instances of the FTP daemon would do to determine, if a file was eligible to be moved, overwritten etc.
The lsof() command would also have been nice, yet it isn't installed on that machine.
flock would have been very nice, but it must run on a shared file system.
And that's all I've come up with at the moment. Got any more ideas to share?
Cheers, Sören2004-10-22 Edited by Arunbear: Changed title from 'Is anybody using that file, tell me?', as per Monastery guidelines
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
•Re: (OT) Is anybody using that file, tell me?
by merlyn (Sage) on Oct 21, 2004 at 13:03 UTC |