Off the top of my head, you could do something like:
touch tinyfile
scp bigfile tinyfile user@host:
Then when tinyfile
appears you know that the transfer of bigfile
is complete.
As pointed out in the comments, this assumes that scp
will copy the files one by one, in the order specified. If you don't trust it, you could do them one by one explicitly:
scp bigfile user@host:
scp tinyfile user@host:
The disadvantage of this approach is that you would potentially have to authenticate twice. If this were an issue you could use something like ssh-agent.