Take the 2-minute tour ×

My ISP charges me if my server downloads more then uploads. Now I have 2 linux machines. How to make one of them send 100Gb of random information to another and don't create large file on disk?

share|improve this question

closed as not a real question by Ward, Sven, Khaled, Ben Pilbrow, Iain Dec 26 '11 at 11:58


That is one not-so-smart billing scheme... –  Antoine Benkemoun Dec 26 '11 at 11:09
Got it. I need to use netcat: <endless stream> | nc -l 1234 and at another host nc <first host> 1234 > /dev/null. Now all that remains is to figure out how to write 100G to input pipe. –  Poma Dec 26 '11 at 11:29
cat /dev/zero ou cat /dev/urandom. It won't be limited to 100G so you should watch out. –  Antoine Benkemoun Dec 26 '11 at 11:38
urandom causes additional load, so i'll use zero. Also i figured out that i can pipe it to head -c <bytes> to limit file size –  Poma Dec 26 '11 at 11:41

2 Answers 2

up vote 3 down vote accepted

So the final solution is:

Sending machine

 cat /dev/zero | head -c <bytes> | nc -l <port>

Receiving machine

nc <sending ip> <port> > /dev/null
share|improve this answer

How about this to generate 100GB of random data?

cat /dev/urandom | head -c 100000000000
share|improve this answer
