]> git.ipfire.org Git - thirdparty/man-pages.git/blob - man4/null.4
getent.1, _syscall.2, acct.2, adjtimex.2, bdflush.2, brk.2, cacheflush.2, getsid...
[thirdparty/man-pages.git] / man4 / null.4
1 .\" Copyright (c) 1993 Michael Haardt (michael@moria.de),
2 .\" Fri Apr 2 11:32:09 MET DST 1993
3 .\"
4 .\" This is free documentation; you can redistribute it and/or
5 .\" modify it under the terms of the GNU General Public License as
6 .\" published by the Free Software Foundation; either version 2 of
7 .\" the License, or (at your option) any later version.
8 .\"
9 .\" The GNU General Public License's references to "object code"
10 .\" and "executables" are to be interpreted as the output of any
11 .\" document formatting or typesetting system, including
12 .\" intermediate and printed output.
13 .\"
14 .\" This manual is distributed in the hope that it will be useful,
15 .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
16 .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 .\" GNU General Public License for more details.
18 .\"
19 .\" You should have received a copy of the GNU General Public
20 .\" License along with this manual; if not, see
21 .\" <http://www.gnu.org/licenses/>.
22 .\"
23 .\" Modified Sat Jul 24 17:00:12 1993 by Rik Faith (faith@cs.unc.edu)
24 .TH NULL 4 2009-02-23 "Linux" "Linux Programmer's Manual"
25 .SH NAME
26 null, zero \- data sink
27 .SH DESCRIPTION
28 Data written to a \fBnull\fP or \fBzero\fP special file is discarded.
29 .PP
30 Reads from the \fBnull\fP special file always return end of file (i.e.,
31 .BR read (2)
32 returns 0), whereas
33 reads from \fBzero\fP always return bytes containing zero (\e0 characters).
34 .LP
35 \fBnull\fP and \fBzero\fP are typically created by:
36 .RS
37 .sp
38 mknod \-m 666 /dev/null c 1 3
39 .br
40 mknod \-m 666 /dev/zero c 1 5
41 .br
42 chown root:root /dev/null /dev/zero
43 .RE
44 .SH FILES
45 .I /dev/null
46 .br
47 .I /dev/zero
48 .SH NOTES
49 If these devices are not writable and readable for all users, many
50 programs will act strangely.
51 .SH SEE ALSO
52 .BR chown (1),
53 .BR mknod (1),
54 .BR full (4)