I send the file with
cat file1 | nc ip-address port and receive it with
nc -l port > file2 and get the file cut. The size of the received file is 28467200 bytes (approx. 28M) out of approx. 150M.
uname -a Linux MyName 3.13.0-107-generic #154-Ubuntu SMP Tue Dec 20 09:57:27 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
On other linux I have (Loki in VirtualBox inside Windows7) this limitation is not available.
uname -a Linux Loki-VirtualBox 4.4.0-57-generic #78-Ubuntu SMP Fri Dec 9 23:50:32 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
I also used other software as a sending side with same result, therefore I blame the receiving part.
In Wireshark I see the (FIN, ACK) flag which makes the connection to close, but I cannot find any reason for it.
What could be a reason for such behavior?
EDIT: In case I use
nc -l port > filename I receive 28M of data, but if I use
nc -l port > filename < /dev/null, I receive 26K of data (took from this question: Sending file via netcat). Is this behavior somehow related?