on Fri, May 04, 2001 at 03:31:21PM +0200, Alexander Steinert ([EMAIL PROTECTED]) 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? > > The problem is that the file is (on the server) accessible for reading > from the moment the client starts to copy. > > My first guess is to try something like `echo "" >> file' and hope that > linux throws an error, because file is already opened for writing by the > samba daemon. But maybe samba writes large files in blocks (i.e. opens > and closes the file several times), who knows?
Transfer a validity check prior to the file transfer itself. Size and/or MD5 checksum. When these match the file, you're done. Some file formats (e.g.: tar, gzip) are self-validating -- early truncation raises an error. -- Karsten M. Self <kmself@ix.netcom.com> http://kmself.home.netcom.com/ What part of "Gestalt" don't you understand? There is no K5 cabal http://gestalt-system.sourceforge.net/ http://www.kuro5hin.org
pgp269vzo9YyN.pgp
Description: PGP signature