Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

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
up vote 4 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

Not the answer you're looking for? Browse other questions tagged or ask your own question.