Whenever you read from or write to a file, you don’t directly access the file. Instead, the operating system does that for you.
These three files are special in the sense that when you use them, the OS pretends they are real files when in fact they are “pretend” files.
When you try to write to /dev/null, the OS simply discards your input.
When you read from /dev/zero, the OS just gives you a bunch of zeroes.
And when you read from /dev/random, the OS just gives you a bunch of random numbers.
Latest Answers