Learn how to a build a cloud-first strategyRegister Now

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 470
  • Last Modified:

File transferr using sftp through expect is partiall


I am doing automated file transfer using sftp, but every time file transferr for big files is partiall

but for the small files getting transferred fine, but for the big files once it is getting bye after 19%, another time 26%, each time it is diffrent, never crosses 26%

Thanks for the help
"spawn /usr/local/bin/sftp -v $user@$host ; expect "Password\"; send \"$pass\\n\"; expect \"sftp> \" ; send \"cd $Dir2 \\n\"; expect \"sftp> \"; send \"lcd $Dir1/$tmpDir \\n\"; expect \"sftp> \"; send \"get $File1 \\n\"; expect \"sftp> \"; send \"bye \\n\"; expect eof;";

Open in new window

1 Solution
are you able to finish file transfer of bog files with interactive sftp? it could be that your network is congested and drops connections.
prakashagrAuthor Commented:
The manual transffer of the same file is sucessfull, but when we tried through automated script for the same big file it is getting partiall transferr
You could try "set timeout 600" ,or some other number of seconds, before the spawn.

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now