[ Previous | Next | Contents | Glossary | Home | Search ]
AIX Version 4 Files Reference

null Special File


Provides access to the null device, typically for writing to the bit bucket.


The /dev/null special file provides character access to the null device driver. This device driver is normally accessed to write data to the bit bucket (when the data is to be discarded).

Usage Considerations

When using subroutines with the null device file, consider the following items:

open and close subroutines The null device can be opened by using the open subroutine with the /dev/null special file name. The close subroutine should be used when access to the null device is no longer required.
read and write subroutines Data written to this file is discarded. Reading from this file always returns 0 bytes.
ioctl subroutine There are no ioctl operations available for use with the null special file. Any ioctl operation issued returns with the ENODEV error type.

Implementation Specifics

The null special file is part of Base Operating System (BOS) Runtime.

Related Information

Special Files Overview.

The close subroutine, ioctl subroutine, open subroutine.

[ Previous | Next | Contents | Glossary | Home | Search ]