Hi folks,
Ive got a file being copied onto a server (via ftp or scp), when it arrives I need to copy it onto somewhere else.
is there a neat/simple way for me to know for sure that the file has arrived in it's entirity before I try and copy it on?
I could do md5sum $file; sleep 2s ; md5sum $file and compare the two sums to know that it's not still being written but that seems a bit messy to me.
Any other thoughts?