[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: wait till end of write, how?

On Sat, May 05, 2001 at 08:25:09PM -0700, Rick Commo wrote:
> > Given that a W2k client copies a large file into a samba share on a
> > Linux server, how can a process (e.g. shell script) that will read this
> > file wait until the file is totally transfered?
> .
> .
> .
> One alternative is to use a "semaphore" file.  Have the NT app create a file
> named, say "busy", just prior to starting the transfer of the big file.
> Once the big file is transferred the NT box erases "busy".  The shell script
> would be written so that if the "busy" file exists, it doesn't touch the big
> file.
And if you can't do that, just have the script checksum the file every 5
secs, and if it hasn't changed for 10 secs, you're probably set.

Use the suggestion from Rick first though.


Reply to: