Performing System Management Tasks: HP 3000 MPE/iX Computer Systems > Chapter 8 Allowing Access to the SystemPOSIX on MPE/iX |
|
POSIX, or Portable Operating System Interface, is a set of standards describing the functions of an operating system interface. MPE/iX implements two of the standards to maximize the software portability of applications: C language application programming interfaces (also called POSIX.1) and a command interpreter (shell) and utilities (called POSIX.2). The implementation of POSIX.1 makes MPE/iX POSIX compatible (it supports most of the key POSIX features) and it introduces important changes into the MPE/iX operating system, including:
If you have installed MPE/iX Release 4.5, or a later version of the operating system, you automatically have access to POSIX functionality. No additional configuration is required for you to use many of the POSIX features. The following sections explain the POSIX changes affecting system management. For a more complete discussion of the POSIX features, read New Features of MPE/iX: Using the Hierarchical File System (32650-90351). Before Release 4.5, the MPE/iX file system was limited to three levels: accounts, groups, and files. Figure 8-1 “MPE/iX File System (Prior to Release 4.5)” is a simple example of the traditional file system structure. Beginning with MPE/iX Release 4.5, a hierarchical directory structure was integrated with the traditional file system. In this system, all components exist under one root directory, designated as /. Additional directories, which contain files and other directories, can exist anywhere in the file system. MPE/iX accounts and groups are considered to be special directories that, while they fit into the hierarchical scheme, continue to serve as traditional MPE accounts and groups. To ensure that the classic MPE file system view still exists, accounts can only be created under the root directory, and groups can only be created under accounts. Figure 8-2 “MPE/iX File System (Release 4.5 and Later)” shows the MPE/iX hierarchical file system structure. Theframe="all"ed portion shows how the traditional account, group, and file system structure fits into the HFS structure. Hierarchical directories and HFS files can now fall under traditional MPE groups. For example, the figure shows lowercase_file as being located in the PUB group of the ACCT1 account. Also notice that the directory dir3 falls under the GRP1 group in the SYS account. MPE/iX provides an expanded file naming syntax so you can refer to files, groups, accounts, and directories existing at all levels within the hierarchical file system. You can still name accounts, groups, and files by using the familiar MPE syntax. However, you'll need to use the HFS naming syntax to refer to files or directories existing outside the traditional file system structure. HFS syntax consists of two parts: a path descriptor and a file name. Together, these components are called a pathname. The syntax describes files by referencing the path or location leading to the file. For example, the file name /SYS/PUB/CI in HFS syntax is the same as CI.PUB.SYS in MPE syntax. All names beginning with . or / in the MPE command interpreter (CI) or intrinsics are interpreted according to HFS syntax conventions. HFS syntax operates as follows:
You can refer to traditional MPE file names using HFS syntax but you must specify the name in uppercase characters. For example, if a file named BILLING exists in the PUB group of the MKTG account (BILLING.PUB.MKTG), you can refer to it using HFS syntax as ./BILLING if you are in the PUB group. You can also refer to it as /MKTG/PUB/BILLING. If you refer to the file as ./billing, MPE/iX would not locate the file. HFS files are referenced using pathnames. Each component in a valid pathname refers to a directory, except for the last component, which may be either a directory or a file. The pathname's series of name components describes a path through the file system hierarchy. HFS pathnames differ from MPE pathnames in the following ways:
Using these conventions, the format of the MPE pathname MYFILE.PAYROLL.FINANCE appears as follows in HFS syntax:
Files can be referenced using either absolute or relative pathnames. An absolute pathname begins with a forward slash (/) and is interpreted starting from the root directory. A relative pathname begins with a dot- slash (./) and is interpreted starting from your current working directory. When working in the MPE/iX shell, relative pathnames need not begin with a dot-slash (./). The MPE/iX shell provides a set of commands and utilities in a UNIX®-like environment on MPE/iX. You can invoke the shell from the CI by typing SH (the system-provided UDCs must be activated) or by executing SH.HPBIN.SYS -L. Type exit to exit the shell and return to the CI. Table 8-1 lists some tasks and associated MPE/iX shell commands and the comparable MPE commands, utilities, or features. Not all of the shell commands operate in the same way as the MPE command or feature; some are rough equivalents. For example, the shell command grep can search through a set of files for a text string. You use a text editor to search for text strings one file at a time in MPE/iX. Table 8-1 Selected MPE/iX Shell Commands
Refer to the MPE/iX Shell and Utilities Reference Manual (36431-90001) for complete information about all of the shell commands provided by the MPE/iX shell. |