3

I am trying to transfer a large (1.5 GB) text file using SCP. While the transfer finishes normally, only 1.4 GB are transferred. Is there any reason for this incomplete transfer. I am on Ubuntu 10.04

Sirex
  • 5,499
  • 2
  • 33
  • 54
myahya
  • 151
  • 1
  • 4
  • 2
    I'm not sure if there's a reason, but there is a lack of details that's for sure. Are both computer running Ubuntu? Is the SCP client "hanging" or did it end properly. Did you do a MD5 checksum of both files just to make sure it's not simply a "GUI" issue? – Alex Sep 12 '11 at 12:50
  • Are you copying the file over LAN or WAN? I usually use `scp` to copy huge files over LAN and it is working fine. Over WAN, I usually prefer to limit the download/upload rate over slow links. – Khaled Sep 12 '11 at 12:53
  • @myahya do you have got a solution for this? I am also seeing this issue intermittently on centOS. – Pawan Mar 20 '16 at 12:34

2 Answers2

6

Is there anything in the debug output? To see the debug, run scp with the "-v" option.

Also, if there's an incomplete copy, you can use "rsync" to do the file transfer. I'd actually prefer using rsync over scp for any large file for this reason.

cjc
  • 24,916
  • 3
  • 51
  • 70
3

Did it actually do an incomplete copy, or is there a filesystem difference that you're seeing?

The best way to measure this is to do an md5 checksum on the source and on the copied file. Depending on your OS, you may have md5sum or md5 to run the checksum, or download an md5 sum utility (for Windows). Compare the outputs. If they differ, you have a corrupt/partial file. If they're the same, you are just seeing a filesystem difference, and it's nothing to worry about.

Bart Silverstrim
  • 31,172
  • 9
  • 67
  • 87