|
Question : How to verify successful transfer using sftp in batch mode.
|
|
We are spinning our wheels trying to write a script to verify a file transfer using sftp was successful. In the script we are attempting to do a put and then an ls. However the ls only prints to screen and not to a file where we can push to source and verify it exists at the correct size on the remote site. Any help greatly appreciated.
|
Answer : How to verify successful transfer using sftp in batch mode.
|
|
If You would use scp instead of sftp, scp returns 0 upon success and non-zero exit code upon failure.
|
|
|