What really happens when you redirect to /dev/null?

Heve you ever wondered what&rsquo;s going on behind the scenes when you use > /dev/null to discard output? The Mystery of /dev/null First, let&rsquo;s look at what /dev/null actually is. If you run ls -l /dev/null , you&rsquo;ll see something like this: crw-rw-rw- 1 root root 1, 3 Mar 26 18:31 /dev/null That c at the start? It tells us this is a character device - a special type of file that Linux…