1NULL(4)                    Linux Programmer's Manual                   NULL(4)
2
3
4

NAME

6       null, zero - data sink
7

DESCRIPTION

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

FILES

22       /dev/null
23       /dev/zero
24

NOTES

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

SEE ALSO

34       chown(1), mknod(1), full(4)
35

COLOPHON

37       This page is part of release 5.13 of the Linux  man-pages  project.   A
38       description  of  the project, information about reporting bugs, and the
39       latest    version    of    this    page,    can     be     found     at
40       https://www.kernel.org/doc/man-pages/.
41
42
43
44Linux                             2015-07-23                           NULL(4)
Impressum