1null(4) Kernel Interfaces Manual null(4)
2
3
4
6 null, zero - data sink
7
9 Data written to the /dev/null and /dev/zero special files is discarded.
10
11 Reads from /dev/null always return end of file (i.e., read(2) returns
12 0), whereas reads from /dev/zero always return bytes containing zero
13 ('\0' characters).
14
15 These devices are typically created by:
16
17 mknod -m 666 /dev/null c 1 3
18 mknod -m 666 /dev/zero c 1 5
19 chown root:root /dev/null /dev/zero
20
22 /dev/null
23 /dev/zero
24
26 If these devices are not writable and readable for all users, many pro‐
27 grams will act strangely.
28
29 Since Linux 2.6.31, reads from /dev/zero are interruptible by signals.
30 (This change was made to help with bad latencies for large reads from
31 /dev/zero.)
32
34 chown(1), mknod(1), full(4)
35
36
37
38Linux man-pages 6.04 2023-02-05 null(4)