/dev/zero

/ dev / zero is the name of a specific virtual device file on Unix and Unix-like operating systems that satisfy every read access by the fact that the requested number of zero bytes is returned ( zero characters). In contrast to / dev / null / dev / zero is not part of the POSIX standard.

/ dev / zero was introduced with SunOS 4.0 in 1987 together with the new VM subsystem.

Details

When writing to / dev / zero, behaves / dev / zero as / dev / null. In a mmap on / dev / zero anonymous zeroed pages from the virtual storage pool of the kernel are provided. Many operating systems use this mmap mechanism to provide programs and shared libraries called uninitialized data area. Many programs use data areas that have been generated by a mmap on / dev / zero, as the basis of shared memory that is used for communication between multiple processes.

Examples

The following Unix command file creates a file that is 12MB in size and contains only the null character:

Dd if = / dev / zero bs = 1M of = file count = 12 see also

  • Virtual device file
  • Input Device
  • Output device
  • / dev / random
  • Device file
  • POSIX
  • Unix
  • UNIX operating system component
  • Linux operating system component
234012
de