![]() |
![]() |
|
|
![]() |
![]() |
Performing System Management Tasks: HP 3000 MPE/iX Computer Systems > Chapter 8 Allowing Access to the System![]() Managing Directories |
|
A directory is a special kind of file that contains entries that point to other files and directories. Directories, like MPE groups, help applications and users to organize files in a logical manner on the system. A directory contained within another directory is also called a subdirectory. A directory that contains other directories is called a parent directory. Directories, subdirectories, and files form a structure for the file system. A directory ENTRY associates a file name with a file. MPE/iX has four types of directories:
The overall directory structure has a common root. The root of the directory is called the parent directory. A slash (/) separates each part of a pathname. The maximum pathname length is 1023 characters. Although pathnames can be 1023 characters, other system limits restrict pathname length. For example, the command interpreter limits the number of characters you can type in a command to 511 characters. When the pathname begins at the root directory, it is called an absolute pathname. An example of an absolute pathname is:
The example describes the location of the file 2file. It is in the directory dir1, which is a subdirectory of the MYGRP group; MYGRP is in the SYS account, which is a subdirectory of the root directory (/). An absolute pathname is similar to a fully qualified MPE file name in that the names of all the components are listed. The fully qualified MPE file name TDP.PUB.SYS translates to the absolute pathname /SYS/PUB/TDP. Other pathnames are relative to a process's current working directory. (The current working directory is the directory where you are working.) So if you specify the name ./jvance/spook, MPE looks for a subdirectory called jvance in your current working directory, then for a file called spook in that directory. You can create directories in any directory, group, or account to which you have CD access. You must have the following privileges to create directories directly under an MPE group:
To create a directory in your current working directory, use the NEWDIR command. For example, to create a new directory called CPROGS in your current working directory, enter:
To create a directory in a group other than your logon group, use the full pathname of the directory in the NEWDIR command line. For example, to create a new directory called cprogs in the group called BOB in the PRG account, enter:
If you typed the name in lowercase and did not preface it with a ./ or /, MPE/iX converts it to uppercase. If you want to use HFS syntax for naming a directory, you need to preface the name with ./ or /. For example, to create a directory with a lowercase name, enter:
You can use access control definitions (ACDs) to grant the following accesses to directories:
By default, directories allow Read ACD privilege to all users on the system (RACD:@.@). You can use the LISTFILE command to display directory ACDs. You assign or change directory ACDs using the ALTSEC command. Read the MPE/iX Commands Reference Manual, Vol. I (32650-90003) for detailed syntax and descriptions of ALTSEC and LISTFILE. The root directory, accounts, and groups cannot be assigned ACDs. However, all users are granted access equivalent to read directory entries (RD) access and traverse directory entries (TD) access to root, all accounts, and all MPE groups. Initially, only you as the system manager have create directory entries (CD) and delete directory entries (DD) access to root. CD and DD access are governed by the appropriate privileges. Save access for an MPE group implies CD and DD permission. A user can create or delete a directory in an MPE group if the group grants Save access to the user. The LISTFILE command traverses hierarchical directories and accepts pathnames. Because MPE/iX file names can be long, the output format displays any names with the HFS syntax as the last item, wrapping the ends of long file names onto the next line, if necessary. To list only the directories that are within the current working directory, use the LISTDIR system-provided UDC. The LISTDIR UDC invokes the LISTFILE command. You can also use LISTDIR to show directories anywhere on the system:
Use the LISTFILE command to list files in directories. For example, to list all of the files and any directories (which are distinguished from files by a trailing slash) in the current working directory, enter:
To list only files named using MPE syntax:
Use the PURGEDIR command to delete a hierarchical directory. You need to begin the name with (.) or (/) otherwise the name is interpreted using MPE syntax rather than HFS syntax. You cannot use PURGEDIR to delete an account, an MPE group, the root directory, or a file. You will receive an error message if you try. Although you can specify (.) and (..) in the PURGEDIR command, you cannot delete these directories. You must have traverse directory entries (TD) access to the directory you want to delete and any other directories referenced in the pathname. You must have delete directory entries (DD) access to the parent directory of the directory you are deleting. You can also use wildcards to delete directories and the files or directories they contain. For example, to delete all empty directories in the current working directory with TMP in their name, enter:
Or, to delete all directories under the CWD with names beginning with TMP, and all objects below these directories, enter:
Use the CHDIR command to move from one directory to another or to return to your logon directory. For example, if you created a directory called memos in your logon group (ALEXB) in your account (FOX) and your current working directory is /FOX/ALEXB, you can move to it as follows:
The name ./memos is a relative pathname. MPE interprets it relative to the current working directory. You can move back up to the MPE group level by specifying the full pathname:
Or, if ALEXB is your logon group, simply enter CHDIR. MPE/iX provides a CI variable called HPCWD that keeps track of your current working directory (CWD). As you move around in the file system, it is useful to display your current location. To find out your current working directory, showing the path from the root, enter:
You can change your prompt so that it shows your current working directory at all times by including the variable in the prompt. To do so, at the MPE prompt, type:
Use the DISKUSE command to display the amount of disk space used by a directory. Each column contains information about the directory you're reviewing.
Sometimes the number of sectors under the TREE column are followed by a plus sign. This means that the amount refers to directories that are one level below the target directory. You can also report the disk space used by a directory and all subtrees below it. If you specify a directory ending with a / and use HFS syntax or use the TREE option, the command reports the amount of space used by it and all directories in it.
|
![]() |
||
![]() |
![]() |
![]() |
|||||||||
|