Server A generates a file and scp's it to Server B. I have cron running on Server B that each minute looks for new files that were copied over. My question is- how can Server B ensure that the file that was copied over is actually done being copied? I don't want to start processing the file unless it's been fully written to. Is this possible to determine?
Asked
Active
Viewed 108 times
1 Answers
1
SCP it over under a temporary name and then rename it to its proper name, as the move will be an atomic process.

Dennis Williamson
- 62,149
- 16
- 116
- 151

McJeff
- 2,039
- 13
- 11
-
works for me! great idea! – Mar 19 '10 at 21:43