Why do we mount devices in Linux?
Why do we mount devices in Linux?
September 13, 2022
Dry Run Testing
Dry Run Testing
September 27, 2022

September 20, 2022

Black Hole of Linux: /dev/null

In Linux systems, /dev/null is a special file called the null device or also called the 'blackhole', because it instantly discards anything written to it and only returns an end of file when read.
For instance, we can read the disk called 'hdal' block by block with the command below:
dd if=/dev/hdal of=/dev/null
Each block which is read is thrown to blackhole and destroyed. If any errors occurred, dd command will stop. This says us something is not on the way. If no errors occurred, blocks which are read and written will be equal. Thus, it performs a simple disk sanity check without any unnecessary output.

Black Hole of Linux: /dev/null
This website uses cookies to improve your experience. By using this website you agree to our Data Privacy Statement
Read more