It does not work with scp. I've rechecked it twice on different systems: if you truncate source file for scp, it still continue to copy data. It displays '-stalled-' state, but network activity is very high for very long time after the file was truncated.
Try yourself:
fallocate big -l 10G
scp big remote_server: &
truncate big --size 0
Check network interface load (atop utility, for example) right after that script. It will be very high until copy is not finished.
It does not work with scp. I've rechecked it twice on different systems: if you truncate source file for scp, it still continue to copy data. It displays '-stalled-' state, but network activity is very high for very long time after the file was truncated.
Try yourself:
fallocate big -l 10G
scp big remote_server: &
truncate big --size 0
Check network interface load (atop utility, for example) right after that script. It will be very high until copy is not finished.