Introducing POSIX [ Performing System Management Tasks ] MPE/iX 5.0 Documentation
Performing System Management Tasks
Introducing POSIX
POSIX, or Portable Operating System Interface, is a set of standards
describing the functions of an operating system interface. Initially,
MPE/iX is implementing 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 initial implementation of POSIX.1 makes MPE/iX POSIX compatible.
That is, it supports most of the key POSIX features and introduces
important changes into the MPE/iX operating system, including:
* A hierarchical file system (HFS) which allows you to create
multilevel data hierarchies.
* An expanded file-naming syntax that allows for longer names, mixed
case alphabetic characters and special characters.
* A new user environment, the MPE/iX shell, that provides a set of
commands and utilities in a UNIX-like environment. The shell is
an addition to the MPE/iX command interpreter, not a replacement
for it.
* Enhancements to the accounting and security systems including user
and group IDs, file ownership, and four new ACD access modes.
* The ability to rename and move files across account boundaries and
have a greater measure of control over files and directories on
the system.
When MPE/iX Release 4.5 (or later) is installed, you automatically have
access to POSIX functionality. No additional configuration is required
for you to use many of the POSIX features.
The following sections introduce the POSIX changes affecting system
management. For a more complete discussion of the new features, read New
Features of MPE/iX: Using the Hierarchical File System (32650-90351).
The Hierarchical File System (HFS)
Before Release 4.5, the MPE/iX file system was limited to three levels:
accounts, groups, and files. Figure 8-1 is a simple example of the
traditional file system structure.
Figure 8-1. MPE/iX File System (Prior to Release 4.5)
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 shows the MPE/iX hierarchical file system structure. The
boxed 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.
Figure 8-2. MPE/iX File System (Release 4.5 and Later)
Expanded File Naming Syntax
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:
* HFS file or directory names can include alphanumeric characters
(A-Z, a-z, 0-9) and the special characters dot (.), underscore
(_), and hyphen (-).
* File or directory names cannot begin with a hyphen (-).
* HFS syntax is case sensitive. So, HFS file or directory names can
be in uppercase, lowercase, or mixed case.
* HFS file or directory names are specified in the CI and in
intrinsics by preceding them with a . or /.
* HFS file or directory names can be specified in the shell without
having to precede the names with a . or /.
* HFS directory or file names that are directly under the root or
directly under a group must be less than or equal to 16
characters.
* HFS directory or file names under HFS directories can be up to 255
characters long.
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:
* Names are separated with forward slashes (/), rather than dots.
* The order of the file name, group name, and account name
are presented in reverse order compared to MPE syntax
(/ACCT/GROUP/FILE versus FILE.GROUP.ACCT).
* Slash (/) at the beginning of a pathname indicates the root
directory.
* Dot-slash (./) at the beginning of a pathname indicates the
current working directory (CWD). The CWD is the directory in which
you are currently working.
* Pathnames can be up to 1023 characters whereas traditional MPE
names must be less than or equal to 26 characters (names can be up
to 35 characters if a lockword is used).
Using these conventions, the format of the MPE pathname
MYFILE.PAYROLL.FINANCE appears as follows in HFS syntax:
/FINANCE/PAYROLL/MYFILE
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 (./).
MPE/iX Shell and Utilities
The MPE/iX shell provides a set of commands and utilities in a
UNIX(R)-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
-----------------------------------------------------------------------------------------------
| | | |
| Task | Shell Command | Comparable MPE/iX Feature |
| | | |
-----------------------------------------------------------------------------------------------
| | | |
| Shorten command names using an alias | alias | command files or UDCs |
| | | |
-----------------------------------------------------------------------------------------------
| | | |
| Change working area | cd | CHDIR |
| | | |
-----------------------------------------------------------------------------------------------
| | | |
| Copy files | cp | COPY, FCOPY, DSCOPY |
| | | |
-----------------------------------------------------------------------------------------------
| | | |
| Display all or part of text files | cat, more, | PRINT |
| | tail | |
| | | |
-----------------------------------------------------------------------------------------------
| | | |
| Determine disk usage | du | DISKUSE, REPORT |
| | | |
-----------------------------------------------------------------------------------------------
| | | |
| Search for text patterns in a file | grep, egrep, | Search commands in text |
| | fgrep | editors |
| | | |
-----------------------------------------------------------------------------------------------
| | | |
| Terminate a process or job that's running | kill | ABORTJOB, ABORT |
| | | |
-----------------------------------------------------------------------------------------------
| | | |
| Rename files | mv | RENAME |
| | | |
-----------------------------------------------------------------------------------------------
| | | |
| Display current working directory | pwd | SHOWVAR HPCWD |
| | | |
-----------------------------------------------------------------------------------------------
| | | |
| Delete files | rm | PURGE |
| | | |
-----------------------------------------------------------------------------------------------
| | | |
| Delete directories | rmdir | PURGEDIR |
| | | |
-----------------------------------------------------------------------------------------------
| | | |
| Sort information | sort | Sort/Merge utility |
| | | |
-----------------------------------------------------------------------------------------------
| | | |
| Edit text or program files | vi, ed, ex | EDIT/3000 |
| | | |
-----------------------------------------------------------------------------------------------
| | | |
| Display a list of who's logged on the | who | SHOWJOB, SHOWPROC |
| system | | |
| | | |
-----------------------------------------------------------------------------------------------
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.
MPE/iX 5.0 Documentation