Category
page 1Device file
/dev/null
special computer file that discards all writes
device file
interface to a device driver that appears in a file system as if it were an ordinary file; e.g. /dev/* in Unix-like systems; CON, PRN, NUL in DOS/Windows
/dev/zero
is a special file in Unix-like operating systems that provides as many null characters (ASCII NUL, 0x00) as are read from it. One of the typical uses is to provide a character stream for initializing data storage.

/dev/random
thumb|upright=1.5|256 byte hex dump of
In Unix-like operating systems, ' and ' are special files that provide random numbers from a cryptographically secure pseudorandom number generator (CSPRNG). The CSPRNG is seeded with entropy (a value that provides randomness) from environmental noise, collected from device drivers and other sources. Users can obtain random numbers from the CSPRNG simply by reading the file. Not all operating systems implement the same methods for and .
/dev/full
In Linux, FreeBSD, and NetBSD, , or the always-full device, is a special file that always returns the error code (meaning "No space left on device") on writing, and provides any number of zero bytes to a process that reads from it (similar to ). This device is usually used when testing the behavior of a program when it encounters a "disk full" error.
$ echo "Hello, World" > /dev/full
bash: echo: write error: No space left on device