Article · Wikipedia archive · Last revised Jul 13, 2026

/dev/full

In Linux, FreeBSD, and NetBSD, /dev/full, or the always-full device, is a special file that always returns the error code ENOSPC on writing, and provides any number of zero bytes to a process that reads from it. This device is usually used when testing the behavior of a program when it encounters a "disk full" error.

Last revised
Jul 13, 2026
Read time
≈ 1 min
Length
280 w
Citations
10
Source

In Linux, FreeBSD, and NetBSD, /dev/full, or the always-full device,12 is a special file that always returns the error code ENOSPC (meaning "No space left on device") on writing, and provides any number of zero bytes to a process that reads from it (similar to /dev/zero).3 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

History

Support for the always-full device in Linux is documented as early as 2007.2 Native support was added to FreeBSD in the 11.0 release in 2016,4 which had previously supported it through an optional module called lindev.45 The full device appeared in NetBSD 8.6

Relationship to other special files

Device Read behavior3 Write behavior3 Use case
/dev/full Returns zeros Returns ENOSPC Testing disk full errors
/dev/zero Returns zeros Discards data Memory initialization
/dev/null Returns EOF Discards data Suppressing output
See also

See also

References

References

  1. Aoki, Osamu (November 22, 2010). "Chapter 1. GNU/Linux tutorials". Archived from the original on 2010-06-15. Retrieved November 22, 2010.
  2. "Man Page for full (Linux section 4)". November 24, 2007. Retrieved June 1, 2011.{{cite web}}: CS1 maint: deprecated archival service (link)
  3. Robbins, Kay A.; Robbins, Steven; Robbins, Kay A. (2003). UNIX systems programming: communication, concurrency, and threads. Upper Saddle River, NJ: Prentice Hall PTR. ISBN 978-0-13-042411-2.
  4. "FreeBSD 11.0-RELEASE Release Notes". FreeBSD official site. Archived from the original on 11 October 2016. Retrieved 9 March 2019.
  5. "LINDEV(4) Device Drivers Manual". Debian. Archived from the original on 2021-05-15. Retrieved 2021-05-15.
  6. "full(4) - NetBSD Manual Pages". NetBSD. Archived from the original on 2021-05-15.