*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->HP-UX 11i man pages -> zero (7)              
Title
Content
Arch
Section
 

Contents


 zero(7)                                                             zero(7)




 NAME    [Toc]    [Back]
      zero - zero file

 DESCRIPTION    [Toc]    [Back]
      /dev/zero is a zero special file.  Reads from a zero special file
      always return characters whose value is '0' (\0 characters).

      Data written on a zero special file is discarded or ignored.

      Seeks on a zero special file will always succeed.

      Private mmap() of a zero special file is allowed (see mmap(2)).
      Shared mmap() is not allowed.

 EXAMPLES    [Toc]    [Back]
      In the following example, the buffer `buf' is filled with `len' \0
      characters.


      fildes = open("/dev/zero",...)
      read(fildes, buf, len)

      In the following example, the process now has a range of `len' \0
      characters at memory location `address':


      fildes = open("/dev/zero",...)
      address = mmap(0, len, PROT_READ | PROT_WRITE, MAP_PRIVATE, fildes, any_offset)

 FILES    [Toc]    [Back]
      /dev/zero

 SEE ALSO    [Toc]    [Back]
      mmap(2), null(7).


 Hewlett-Packard Company            - 1 -   HP-UX 11i Version 2: August 2003
[ Back ]
      
      
 Similar pages
Name OS Title
AFclosefile IRIX close an audio file, update file header if file was opened for write access.
fdetach Tru64 Detach a STREAMS-based file descriptor from a file in the file system name space
fattach Tru64 Attach a STREAMS-based file descriptor to a file in the file system name space
migrate Tru64 Move a file or file pages to another volume in an AdvFS file domain
ffm Tru64 File-on-File Mounting File System
AFopenfile IRIX allocate an AFfilehandle structure for an audio file identified by name / by a Unix file descriptor
ff_vxfs HP-UX fast find: list file names and statistics for a VxFS file system
vnconfig OpenBSD configure vnode disks for file swapping or pseudo file systems
link Tru64 Create a hard link to an existing file on the local file system
AFidentifyfd IRIX retrieve the audio file format of a file descriptor / open AFfilehandle
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service