summaryrefslogtreecommitdiffstats
path: root/man4/null.4
diff options
context:
space:
mode:
Diffstat (limited to 'man4/null.4')
-rw-r--r--man4/null.452
1 files changed, 52 insertions, 0 deletions
diff --git a/man4/null.4 b/man4/null.4
new file mode 100644
index 0000000..c1299fb
--- /dev/null
+++ b/man4/null.4
@@ -0,0 +1,52 @@
+.\" Copyright (c) 1993 Michael Haardt (michael@moria.de),
+.\" Fri Apr 2 11:32:09 MET DST 1993
+.\"
+.\" SPDX-License-Identifier: GPL-2.0-or-later
+.\"
+.\" Modified Sat Jul 24 17:00:12 1993 by Rik Faith (faith@cs.unc.edu)
+.TH null 4 2023-02-05 "Linux man-pages 6.05.01"
+.SH NAME
+null, zero \- data sink
+.SH DESCRIPTION
+Data written to the
+.I /dev/null
+and
+.I /dev/zero
+special files is discarded.
+.PP
+Reads from
+.I /dev/null
+always return end of file (i.e.,
+.BR read (2)
+returns 0), whereas reads from
+.I /dev/zero
+always return bytes containing zero (\[aq]\e0\[aq] characters).
+.PP
+These devices are typically created by:
+.PP
+.in +4n
+.EX
+mknod \-m 666 /dev/null c 1 3
+mknod \-m 666 /dev/zero c 1 5
+chown root:root /dev/null /dev/zero
+.EE
+.in
+.SH FILES
+.I /dev/null
+.br
+.I /dev/zero
+.SH NOTES
+If these devices are not writable and readable for all users, many
+programs will act strangely.
+.PP
+Since Linux 2.6.31,
+.\" commit 2b83868723d090078ac0e2120e06a1cc94dbaef0
+reads from
+.I /dev/zero
+are interruptible by signals.
+(This change was made to help with bad latencies for large reads from
+.IR /dev/zero .)
+.SH SEE ALSO
+.BR chown (1),
+.BR mknod (1),
+.BR full (4)