null(4)

null4

The null device

Overview

The null device accepts and reads data as any ordinary (and willing) file, but throws it away. The length of the null device is always zero.

Files

/dev/null

Releases

61 releases since OpenBSD 2.1; the text changed 4 times.

  1. 2.1–2.7
  2. 2.8–3.3
  3. 3.4–4.1
  4. 4.2–6.5
  5. 6.6–8.0

History

null first appeared in Version 4 AT&T UNIX as an empty file, /dev/null, which returned end of file when being read from. An implementation which could also be written to first appeared in Version 5 AT&T UNIX.

From man 8.0-current-20261101 in OpenBSD 8.0-current (2026-11-01). Parsed by carta from the page's mdoc source.