Introduction
Overview
The XCU specification defines the shell command language and the utilities provided by the X/Open System Interface (XSI). The utilities are accessed using commands given to command interpreters supporting the shell command language. The system interfaces and headers (described in CAE Specification, System Interfaces and Headers, Issue 5) and the utilities are jointly known as services to application programs. No particular restrictions are imposed on the way in which the services are implemented.The utilities are defined in terms of their interface as seen from the sh command interpreter. Alternative interfaces are available to application programs through one of the functions, and the popen() and system() interfaces, all of which are described in CAE Specification, System Interfaces and Headers, Issue 5.
Conformance
An implementation conforming to this specification shall meet the following criteria:
- The system shall provide all the utilities described in this specification with all the functionality defined, subject to the following:
- Development utilities listed in
Development need not be provided.
- FORTRAN utilities listed in
FORTRAN need not be provided.
- Legacy utilities listed in
LEGACY need not be provided.
- Within the utilities that are provided, functionality marked by the codes OF, OP, PI, or UN need not be provided.
- The system may provide one or more of the following:
- development utilities (as a group) listed in
Development
- the FORTRAN77 compiler listed in
FORTRAN .
When an implementation claims that an optional or possibly unsupportable facility is provided, all of its constituent parts shall be provided and shall comply with the specification.
When an implementation claims that a development system is provided, all of the utilities marked DEVELOPMENT and listed in
Development , except dis, shall be provided and shall comply with the specification.When an implementation claims that a FORTRAN system is provided, the utility marked FORTRAN and listed in
FORTRAN shall be provided and shall comply with the specification.
- Note:
- To determine whether an implementation supports development, FORTRAN or possibly unsupportable utilities, refer to the implementation's Conformance Statement.
- The system may provide additional or enhanced utilities and facilities not required by this specification, provided that such additions or enhancements do not affect the behaviour of an application that requires only the facilities described in this specification.
An implementation conforming to this specification depends on the environment provided by the system interfaces and headers specified in the referenced XSH specification. For further information, refer to the XSH specification, Section 1.2, Conformance, the referenced XPG4, Version 2 document and the implementation's Conformance Statement.
Symbolic Links
The definition of symbolic links in the XBD specification, Glossary was new in Issue 4, Version 2. An implementation need not support symbolic links to be conformant with this document. (See the XSH specification, Section 1.2, Conformance for the implications on conformance with the XSH specification.)The definition of pathname resolution in the XBD specification, Glossary indicates the effects of symbolic links. However, many utilities that manipulate files may manipulate symbolic links. Use of these utilities in this context (that is, when the last component of the pathname is a symbolic link) produces unspecified effects. In addition, if any utility encounters a symbolic link after pathname resolution has been completed, the effects are unspecified.
Considerations for Utilities in Support of Files of Arbitrary Size
The following utilities will support files of any size up to the maximum that can be created by the implementation. This support includes correct writing of file size-related values (such as file sizes and offsets, line numbers, and block counts) and correct interpretation of command line arguments that contain such values.
- basename
- Return non-directory portion of pathname.
- cat
- Concatenate and print files.
- cd
- Change working directory.
- chgrp
- Change file group ownership.
- chmod
- Change file modes.
- chown
- Change file ownership.
- cksum
- Write file checksums and sizes.
- cmp
- Compare two files.
- cp
- Copy files.
- dd
- Convert and copy a file.
- df
- Report free disk space.
- dirname
- Return directory portion of pathname.
- du
- Estimate file space usage.
- find
- Find files.
- ln
- Link files.
- ls
- List directory contents.
- mkdir
- Make directories.
- mv
- Move files.
- pathchk
- Check pathnames.
- pwd
- Return working directory name.
- rm
- Remove directory entries.
- rmdir
- Remove directories.
- sh
- Shell, the standard command language interpreter.
- sum
- Print checksum and block or byte count of a file.
- test
- Evaluate expression.
- touch
- Change file access and modification times.
- ulimit
- Set or report file size limit.
Exceptions to the requirement that utilities support files of any size up to the maximum are:
- Utilities such as tar and cpio cannot support arbitrary file sizes due to limitations imposed by fixed file formats.
- Uses of files as command scripts, or for configuration or control, are exempt. For example, it is not required that sh be able to read an arbitrarily large ".profile".
- Shell input and output redirection are exempt. For example, it is not required that the redirections sum < file or echo foo > file succeed for an arbitrarily large existing file.
Options
Utilities marked DEVELOPMENT, FORTRAN or LEGACY are optional. See
Conformance for conformance requirements.Development
Utilities marked DEVELOPMENT in this specification are: Even if the DEVELOPMENT option is supported, or the LEGACY option is supported, the dis utility need not be supported.
Development Utilities admin get nm strip cflow lex prs unget ctags lint rmdel val cxref m4 sact what delta make sccs yacc dis FORTRAN
The fort77 FORTRAN compiler is the only utility marked FORTRAN in this specification. LEGACY
The utilities in the table below are marked LEGACY. Various factors may have contributed to the decision to class a utility LEGACY. Application writers should not use functionality marked LEGACY. If a migration path exists, advice is given to application developers regarding alternative means of obtaining similar functionality. This information may be found in the APPLICATION USAGE sections on the relevant pages.
No requirement beyond that which was in effect at the time that these utilities were marked LEGACY shall be applied to these utilities.
Legacy Utilities calendar cancel cc col cpio cu dircmp dis egrep fgrep line lint lpstat mail pack pcat pg spell sum tar unpack uulog uuname uupick uuto