]>
Commit | Line | Data |
---|---|---|
3d54a910 MK |
1 | .\" Copyright (c) 1993 Michael Haardt (michael@moria.de), |
2 | .\" Fri Apr 2 11:32:09 MET DST 1993 | |
fea681da | 3 | .\" |
e4a74ca8 | 4 | .\" SPDX-License-Identifier: GPL-2.0-or-later |
c13182ef | 5 | .\" |
fea681da | 6 | .\" Modified Sat Jul 24 17:00:12 1993 by Rik Faith (faith@cs.unc.edu) |
5722c835 | 7 | .TH NULL 4 2015-07-23 "Linux" "Linux Programmer's Manual" |
fea681da MK |
8 | .SH NAME |
9 | null, zero \- data sink | |
10 | .SH DESCRIPTION | |
de347a67 | 11 | Data written to the |
1ae6b2c7 | 12 | .I /dev/null |
de347a67 | 13 | and |
1ae6b2c7 | 14 | .I /dev/zero |
de347a67 | 15 | special files is discarded. |
fea681da | 16 | .PP |
de347a67 | 17 | Reads from |
1ae6b2c7 | 18 | .I /dev/null |
de347a67 | 19 | always return end of file (i.e., |
3508b1f1 | 20 | .BR read (2) |
de347a67 | 21 | returns 0), whereas reads from |
1ae6b2c7 | 22 | .I /dev/zero |
6c22e323 | 23 | always return bytes containing zero (\(aq\e0\(aq characters). |
dd3568a1 | 24 | .PP |
de347a67 | 25 | These devices are typically created by: |
bdd915e2 MK |
26 | .PP |
27 | .in +4n | |
28 | .EX | |
4d9b6984 | 29 | mknod \-m 666 /dev/null c 1 3 |
4d9b6984 | 30 | mknod \-m 666 /dev/zero c 1 5 |
c6f59edf | 31 | chown root:root /dev/null /dev/zero |
bdd915e2 MK |
32 | .EE |
33 | .in | |
fea681da MK |
34 | .SH FILES |
35 | .I /dev/null | |
36 | .br | |
37 | .I /dev/zero | |
2b2581ee MK |
38 | .SH NOTES |
39 | If these devices are not writable and readable for all users, many | |
40 | programs will act strangely. | |
2dad4c59 | 41 | .PP |
dcc9ee34 MK |
42 | Since Linux 2.6.31, |
43 | .\" commit 2b83868723d090078ac0e2120e06a1cc94dbaef0 | |
44 | reads from | |
1ae6b2c7 | 45 | .I /dev/zero |
dcc9ee34 MK |
46 | are interruptible by signals. |
47 | (This change was made to help with bad latencies for large reads from | |
48 | .IR /dev/zero .) | |
47297adb | 49 | .SH SEE ALSO |
fea681da | 50 | .BR chown (1), |
c0ae5dbd MK |
51 | .BR mknod (1), |
52 | .BR full (4) |