encyclopegia.org

/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.

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. ==Function== Read operations from return as many null characters (0x00) as requested in the read operation. All write operations to succeed with no other effects. is more commonly used for this purpose. When is memory-mapped, e.g., with mmap, to the virtual address space, it is equivalent to using anonymous memory; i.e. memory not connected to any file. ==History== was introduced in 1988 in SunOS-4.0 to allow a mappable BSS segment for shared libraries using anonymous memory. HP-UX 8.x introduced the MAP_ANONYMOUS flag for mmap(), which maps anonymous memory directly without a need to open . Since the late 1990s, MAP_ANONYMOUS or MAP_ANON are supported by most UNIX versions, removing the original purpose of . ==Examples== Erasing a USB flash drive using DD: dd if=/dev/zero of=/dev/ This may not perform a secure erasure and may not destroy any data, but may take significantly more time than required for this purpose. Creating a file, named foobar, filled with null characters: ==See also== Unix philosophy Standard streams ==References==

References

No reference rows published for this article.

Cite this article

MLA

"/dev/zero." encyclopegia.org, 2026, https://encyclopegia.org/wiki/dev-zero. Accessed 24 November 2026.

Chicago

"/dev/zero." encyclopegia.org. Accessed November 24, 2026. https://encyclopegia.org/wiki/dev-zero.

APA

encyclopegia.org. (2026). /dev/zero. Retrieved November 24, 2026, from https://encyclopegia.org/wiki/dev-zero

Accessed November 24, 2026 · CC BY-SA 4.0 · citation page · JSON

Related articles

MV Norland

enwiki · references available

Franklin Dam controversy

enwiki · references available

Khasi language

enwiki · references available

Sommelier

enwiki · references available

Eltz Castle

enwiki · references available

White Oak Pocosin

enwiki · references available
CC BY-SA 4.0 · share-alike · https://en.wikipedia.org/w/index.php?oldid=1335881964 · 0.5 · snapshot enwiki-001335881964

Cite · JSON · Search

Related services and records

Services

  • Estate — measured countries, lanes and facts
  • Intel — live corroborated events
  • Legal — statutes, cases and citations
  • Encyclopedia — articles with inline sources
  • Space — launches, satellites and orbits
  • Search — federated search and reports
  • Pass — passport account and SSO
  • Corpora — read-only corpus origins
  • e01 — self-hosted corpora and tools

Text and metadata only; each target carries its own sources. Missing data is published as no-data, never estimated.