HP 3000 Manuals

Managing Directories [ Performing System Operation Tasks ] MPE/iX 5.0 Documentation


Performing System Operation Tasks

Managing Directories 

The structure of the HP 3000 file system traditionally allowed for a
three-level hierarchy made up of accounts, groups, and files.  With
Release 4.5 of MPE/iX, the file system is now tree-strucured, or
hierarchical.  It uses directories, which are a special kind of file that
points to other files and directories, to organize files in a logical
manner.

The hierarchical directory structure has a common root, called the root 
directory and denoted by a slash (/).  The root is the foundation of the
HP 3000 directory structure since it contains all files and directories
on the system.  You can now put files under accounts in addition to being
able to put them under groups, directories, and root.

To use pathnames 

A pathname describes the route (or path) to a file.  It is composed of
the file name prefixed by any directory names.  A slash (/) separates
each part of a pathname.  The maximum pathname length is 1023 characters,
but other system limits can 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 absolute pathname is similar to a fully qualified MPE file
name in that the names of all the components are listed.  For example,
the fully qualified MPE file name TDP.PUB.SYS translates to the absolute
pathname /SYS/PUB/TDP.


NOTE File names using HFS syntax can use upper- and lower-case letters, and they are case sensitive. (For example, the file My_file is not the same as the file my_file.) You must specify all traditional (classic) MPE names in uppercase.
Other pathnames are relative to a process's current working directory, which is the directory where you are working. If you specify the name ./finance/expenses, MPE looks for a subdirectory called finance in your current working directory, then for a file called expenses in that directory. Access to directories Access to directories is controlled by Access Control Definitions, or ACDs. They include: CD - Create directory entries DD - Delete directory entries RD - Read directory entries TD - Traverse directory entries RACD - Read ACD NONE - No access By default, directories allow Read ACD privilege to all users on the system (RACD:@.@). You assign or change directory ACDs using the ALTSEC command. To display directory ACDs, use the LISTFILE command. Refer to Chapter 9 for more information about ACDs and to 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. 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: * Create directory entries (CD) access for the parent directory (or the equivalent, if the parent is a group) * Save files (SF) capability * Traverse directory entries (TD) access to the parent directory To name directories Directory names follow the same rules as file names. Directory names can include the special characters - (hyphen), _ (underscore), and . (dot); they can be uppercase, lowercase, or a combination of the two. The maximum name length for a directory created in the root directory, an MPE group, or an MPE account is 16 characters. Subdirectories of hierarchical directories can have names that are up to 255 characters long. They cannot begin with a hyphen. The file names dot (.) and dot-dot (..) have special meaning. The special file name dot at the beginning of a relative pathname refers to the current working directory. The name dot-dot refers to the directory that is the next level up, also called the parent directory. To work with directories The table below lists the commands that are useful for managing directories on the HP 3000 and briefly defines each one. For more complete information and examples, refer to the MPE/iX Commands Reference Manual Volumes 1 and 2 (32650 -90003 and 32650-90364). Table 5-1. Working with Directories -------------------------------------------------------------------------------------------- | | | | Command | What it Does | | | | -------------------------------------------------------------------------------------------- | | | | NEWDIR | Create a new directory. To create a new directory in the | | | current working directory, enter NEWDIR and the directory name. | | | To create a new directory in another group, enter NEWDIR | | | followed by the full pathname of the group. | | | | -------------------------------------------------------------------------------------------- | | | | LISTDIR | A system-provided UDC that lists all directories and files in | | | your current working directory. As the default, it does not | | | list subdirectories that exist below any of the directories. To | | | use LISTDIR to see any directories on the system, enter LISTDIR | | | dir@. | | | | -------------------------------------------------------------------------------------------- | | | | PURGEDIR | Deletes a hierarchical directory. You cannot use PURGEDIR to | | | delete an account, an MPE group, the root directory, or to | | | directly delete a file. (PURGEDIR will delete files in a | | | directory when you specify the TREE option.) | | | | -------------------------------------------------------------------------------------------- | | | | CHDIR | Moves from one directory to another. To return to your logon | | | group (your initial working directory), enter CHDIR with no | | | arguments. To move to the next level up, enter CHDIR followed | | | by two dots (..). To move to another directory relative to the | | | current directory, enter CHDIR ./ followed by the directory | | | name, for example, CHDIR ./accounting. | | | | -------------------------------------------------------------------------------------------- | | | | SHOWVAR HPCWD | Displays the current working directory. HPCWD is a CI variable | | | that you can also include in the prompt. | | | | -------------------------------------------------------------------------------------------- | | | | DISKUSE | Displays the amount of disk space used by a directory. To see | | | the amount of disk space used by the directory you specified and | | | all of the files and directories below it, add a trailing slash | | | (/) to the command line or use the TREE parameter. For example, | | | DISKUSE /finance/ or DISKUSE /finance ;tree. | | | | -------------------------------------------------------------------------------------------- | | | | FINDDIR | A system-provided UDC that search for a directory name (or | | | pattern) starting at root. | | | | --------------------------------------------------------------------------------------------


MPE/iX 5.0 Documentation