HOME

TheInfoList



OR:

In some
operating system An operating system (OS) is system software that manages computer hardware and software resources, and provides common daemon (computing), services for computer programs. Time-sharing operating systems scheduler (computing), schedule tasks for ...
s, the null device is a
device file In Unix-like operating systems, a device file, device node, or special file is an interface to a device driver that appears in a file system as if it were an ordinary file. There are also special files in DOS, OS/2, and Windows. These s ...
that discards all data written to it but reports that the write operation succeeded. This device is called /dev/null on
Unix Unix (, ; trademarked as UNIX) is a family of multitasking, multi-user computer operating systems that derive from the original AT&T Unix, whose development started in 1969 at the Bell Labs research center by Ken Thompson, Dennis Ritchie, a ...
and
Unix-like A Unix-like (sometimes referred to as UN*X, *nix or *NIX) operating system is one that behaves in a manner similar to a Unix system, although not necessarily conforming to or being certified to any version of the Single UNIX Specification. A Uni ...
systems, NUL: (see TOPS-20) or NUL on
CP/M CP/M, originally standing for Control Program/Monitor and later Control Program for Microcomputers, is a mass-market operating system created in 1974 for Intel 8080/Intel 8085, 85-based microcomputers by Gary Kildall of Digital Research, Dig ...
and DOS (internally \DEV\NUL), nul on
OS/2 OS/2 is a Proprietary software, proprietary computer operating system for x86 and PowerPC based personal computers. It was created and initially developed jointly by IBM and Microsoft, under the leadership of IBM software designer Ed Iacobucci, ...
and newer
Windows Windows is a Product lining, product line of Proprietary software, proprietary graphical user interface, graphical operating systems developed and marketed by Microsoft. It is grouped into families and subfamilies that cater to particular sec ...
systems (internally \Device\Null on
Windows NT Windows NT is a Proprietary software, proprietary Graphical user interface, graphical operating system produced by Microsoft as part of its Windows product line, the first version of which, Windows NT 3.1, was released on July 27, 1993. Original ...
), NIL: on
Amiga Amiga is a family of personal computers produced by Commodore International, Commodore from 1985 until the company's bankruptcy in 1994, with production by others afterward. The original model is one of a number of mid-1980s computers with 16-b ...
operating systems, and NL: on
OpenVMS OpenVMS, often referred to as just VMS, is a multi-user, multiprocessing and virtual memory-based operating system. It is designed to support time-sharing, batch processing, transaction processing and workstation applications. Customers using Op ...
. In Windows Powershell, the equivalent is $null. It provides no data to any
process A process is a series or set of activities that interact to produce a result; it may occur once-only or be recurrent or periodic. Things called a process include: Business and management * Business process, activities that produce a specific s ...
that reads from it, yielding EOF immediately. In IBM operating systems
DOS/360 and successors Disk Operating System/360, also DOS/360, or simply DOS, is the discontinued first member of a sequence of operating systems for IBM System/360, System/370 and later mainframes. It was announced by IBM on the last day of 1964, and it was first d ...
and also in
OS/360 and successors OS/360, officially known as IBM System/360 Operating System, is a discontinued batch processing operating system developed by IBM for their then-new System/360 mainframe computer, announced in 1964; it was influenced by the earlier IBSYS/IBJOB a ...
such files would be assigned in JCL to DD DUMMY. In programmer jargon, especially Unix jargon, it may also be called the bit bucket or
black hole A black hole is a massive, compact astronomical object so dense that its gravity prevents anything from escaping, even light. Albert Einstein's theory of general relativity predicts that a sufficiently compact mass will form a black hole. Th ...
.


History

is described as an empty regular file in
Version 4 Unix Research Unix refers to the early versions of the Unix operating system for PDP-7, DEC PDP-7, PDP-11, VAX and Interdata 7/32 and 8/32 computers, developed in the Bell Labs Computing Sciences Research Center (CSRC). The term ''Research Unix'' first ...
. The Version 5 Unix manual describes a device with modern semantics.


Usage

The null device is typically used for disposing of unwanted output
stream A stream is a continuous body of water, body of surface water Current (stream), flowing within the stream bed, bed and bank (geography), banks of a channel (geography), channel. Depending on its location or certain characteristics, a strea ...
s of a process, or as a convenient empty file for input streams. This is usually done by redirection. For example, tar -c -f /dev/null "example directory" can be used to dry-run the TAR file archiving utility to see if any errors would occur but without writing any file. The /dev/null device is a special file, not a directory, so one cannot move a whole file or directory into it with the Unix mv command.


References in computer culture

This entity is a common inspiration for technical
jargon Jargon, or technical language, is the specialized terminology associated with a particular field or area of activity. Jargon is normally employed in a particular Context (language use), communicative context and may not be well understood outside ...
expressions and
metaphor A metaphor is a figure of speech that, for rhetorical effect, directly refers to one thing by mentioning another. It may provide, or obscure, clarity or identify hidden similarities between two different ideas. Metaphors are usually meant to cr ...
s by Unix programmers, e.g. "please send complaints to /dev/null", "my mail got archived in /dev/null", and "redirect to /dev/null"—being jocular ways of saying, respectively: "don't bother sending complaints", "my mail was deleted", and "go away". The iPhone Dev Team commonly uses the phrase "send donations to /dev/null", meaning they do not accept donations. The fictitious person name "Dave (or Devin) Null" is sometimes similarly used (e.g., "send complaints to Dave Null"). In 1996, Dev Null was an animated
virtual reality Virtual reality (VR) is a Simulation, simulated experience that employs 3D near-eye displays and pose tracking to give the user an immersive feel of a virtual world. Applications of virtual reality include entertainment (particularly video gam ...
character created by Leo Laporte for MSNBC's computer and technology TV series ''
The Site ''The Site'' is an hour-long television program devoted to the Internet revolution. It debuted in July 1996 with MSNBC's launch, and aired Monday through Saturday, reaching 35 million homes. Soledad O'Brien hosted ''The Site'', along with her ...
''. Dev/null is also the name of a vampire hacker in the computer game Vampire: The Masquerade – Redemption. A 2002 advertisement for the Titanium PowerBook G4 reads "Sends other UNIX boxes to /dev/null." The null device is also a favorite subject of technical jokes, such as warning users that the system's /dev/null is already 98% full. The 1995 April Fool's issue of the German magazine '' c't'' reported on an enhanced /dev/null chip that would efficiently dispose of the incoming data by converting it to a flicker on an internal glowing LED. Dev/Null is also the name of an electronic dance music producer and jungle DJ.


See also


Notes


References

{{nulls CP/M technology Unix file system technology Device file Computer humour