Using cat /dev/random
on my machine (Ubuntu 14.04) in Terminal yields unexpected results. If I'm not mistaken, cat
should basically output the contents of the file and that's it, but in my case cat
prints out random gibberish (as expected) and then continues to output more random gibberish every 5 seconds or so.
I've tried usingtail -f /dev/random
to see how the file changes but this surprisingly yields no output.
What is going on here?
It's not a (regular) file, first thing. It's a "character special file".
http://man7.org/linux/man-pages/man4/random.4.html
Think of it as a "water fountain of random bytes".