From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <102653731622643.tru64-unix-managers.marc@archive.invalid> From: jhamlin () bhe ! com Date: Mon, 11 Mar 2002 11:39:11 +0000 To: tru64-unix-managers Subject: SUMMARY - Secure Copy X-MARC-Message: https://marc.info/?l=tru64-unix-managers&m=102653731622643 The original question: Will cp or scp copy a file that is in the process of being populated? And if, so is there any way to lock the file during copy? Thanks to: John Venier [venier@odin.mdacc.tmc.edu] Jiang Wei [jiang@ebu.ch] Davis, Alan [Davis@tessco.com] Knut Helleb=F8 [Knut.Hellebo@nho.hydro.com] and the Unknown Systems Admin at astro.su.se The concensus is that cp and scp will happily copy a file in the = process of being populated. The most frequent suggestions to prevent this were to write some kind of script or routine as part of the original population = of the file to be copied and either touch a control file when the file has completed being populated and checking for this file prior to copying = it elsewhere. A variation on this theme was to create a "lock" file when = the file was being populated, deleting it when population was complete and having subsequent copies look for the "lock" file prior to copy. I = also had a suggestion to use rsync http://rsync.samba.org to copy the file, but = this is, unfortunately, not an option in my case. Thank you, Jef H. HamLin Bangor Hydro