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

NAME

6       null, zero - data sink
7

DESCRIPTION

9       Data written to a null or zero special file is discarded.
10
11       Reads  from  the  null  special  file  always return end of file (i.e.,
12       read(2) returns 0), whereas reads from zero always  return  bytes  con‐
13       taining zero (\0 characters).
14
15       null and zero 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

SEE ALSO

30       chown(1), mknod(1), full(4)
31

COLOPHON

33       This page is part of release 3.53 of the Linux  man-pages  project.   A
34       description  of  the project, and information about reporting bugs, can
35       be found at http://www.kernel.org/doc/man-pages/.
36
37
38
39Linux                             2009-02-23                           NULL(4)
Impressum