Question

I have an expect script that I have written that at the end calls scp to copy a large file from server a to server b. The issue I have (which is the same using rsysnc and not scp) is that the expect script is terminating before the file transfer is complete. I know that I can set the timeout in expect but as the file size grows so will the timeout. Is there anyone that has come across this issue and is there a wait function that I can use in expect?

Was it helpful?

Solution

You can set the timeout to -1 to disable the timeout feature.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top