Directory Structure and Devices
Directory Structure and FilesThe following directories exist on conforming systems and must be used as described. Portable applications cannot assume the ability to create files in any of these directories.
- The root directory.
- Contains /dev/console, /dev/null and /dev/tty, described below.
The following directory exists on conforming systems and is used as described.
A directory made available for programs that need a place to create temporary files. Applications are allowed to create files in this directory, but cannot assume that such files are preserved between invocations of the application. The /tmp directory is defined to accommodate historical applications that assume its availability. Applications are encouraged to use the contents of TMPDIR for creating temporary files rather than the specific name /tmp. See tempnam() in the XSH specification.
The following files exist on conforming systems and are both readable and writable.
An infinite data source and data sink. Data written to /dev/null is discarded. Reads from /dev/null always return end-of-file (EOF).
In each process, a synonym for the controlling terminal associated with the process group of that process, if any. It is useful for programs or shell procedures that wish to be sure of writing messages to or reading data from the terminal no matter how output has been redirected. It can also be used for programs that demand the name of a file for output, when typed output is desired and it is tiresome to find out what terminal is currently in use.
The following file exists on conforming systems and need not be readable or writable:
The /dev/console file is a generic name given to the system console. It is usually linked to a particular machine-dependent special file. It provides a basic I/O interface to the system console.
Output Devices and Terminal Types
The utilities in the XCU specification historically have been implemented on a wide range of terminal types, but a conforming implementation need not support all features of all utilities on every conceivable terminal. This specification set states which features are optional for certain classes of terminals in the individual utility description sections. The implementation will document which terminal types it supports and which of these features and utilities are not supported by each terminal.
When a feature or utility is not supported on a specific terminal type, as allowed by this specification set, and the implementation considers such a condition to be an error preventing use of the feature or utility, the implementation will indicate such conditions through diagnostic messages or exit status values or both (as appropriate to the specific utility description) that inform the user that the terminal type lacks the appropriate capability.
This specification set uses a notational convention based on historical practice that identifies some of the control characters defined in
Portable Character Setin a manner easily remembered by users on many terminals. The correspondence between this "control-char " notation and the actual control characters is shown in the following table. When this specification set refers to a character by its control- name, it is referring to the actual control character shown in the Value column of the table, which is not necessarily the exact control key sequence on all terminals. Some terminals have keyboards that do not allow the direct transmission of all the non-alphanumeric characters shown. In such cases, the system documentation will describe which data sequences transmitted by the terminal are interpreted by the system as representing the special characters.
Name Value Name Value Name Value control-A <SOH> control-L <FF> control-W <ETB> control-B <STX> control-M <CR> control-X <CAN> control-C <ETX> control-N <SO> control-Y <EM> control-D <EOT> control-O <SI> control-Z <SUB> control-E <ENQ> control-P <DLE> control-[ <ESC> control-F <ACK> control-Q <DC1> control-\ <FS> control-G <BEL> control-R <DC2> control-] <GS> control-H <BS> control-S <DC3> control-^ <RS> control-I <HT> control-T <DC4> control-_ <US> control-J <LF> control-U <NAK> control-? <DEL> control-K <VT> control-V <SYN>
Table: Control Character Names
- The notation uses upper-case letters for arbitrary editorial reasons. There is no implication that the keystrokes represent control-shift-letter sequences.