MAINTaining file systems and directories -- a new frontier ---------------------------------------------------------- Maintaining a large number of files/directories can be a tedious task when all you have is DCL commands to work with. Typing COPY, DELETE, TYPE, RENAME, and PROTECT gets a little time-consuming after a while. You have to do a few commands, often making typing mistakes in the process, and then do a DIRECT to see the current state of the files/directories. Wouldn't it be nice to have one program designed to combine all of this functionality into one nice package? MAINT is a program that does that and much more. It combines the functionality of all of the above DCL commands, adds some new functions, and packages all of it with a full-screen interface that allows you to work with multiple files/directories quickly, easily, and efficiently. The following functions are available in MAINT: 1) delete files/directories 2) copy files 3) rename files/directories 4) protect files/directories 5) edit an Access Control List (ACL) for a file/directory 6) list a file's contents to the screen 7) change to a subdirectory and start over, saving the state of all commands in the current directory 8) get expanded information about a file 9) search for a specific file in a directory 10) suspend MAINT and return to DCL level 11) create extended textual descriptors for files and directories 12) access the help library for MAINT Directories are presented to you in a series of one or more screens, allowing you to work with an entire directory all at once. You can also select what information should be included on the screen for each file by specifying different qualifiers when the program is invoked. A few of the qualifiers are: /DATE include the creation date for all files /SIZE include the file size of each file in number of blocks used /PROTECTION include the protection string for the file /FULL equivalent to /DATE/SIZE/PROTECTION Another handy qualifer is /WIDE which will set your terminal to 132-column mode if it can. This means that more files can appear on each screen, allowing you to see more of a directory at one time. For example, if you only wanted the filenames and you specify the /WIDE qualifer, you can have 114 files on the screen at one time! Try doing that with the DCL DIRECT command. MAINT works within the directory structure provided by VMS, that of a tree. This being the case, the first directory that the programs sees is considered the "root" of the session and is the highest-level directory that is accessible for the duration of the session. Any descendant directories may be accessed, which will be seen shortly. One very important feature of MAINT is that execution of the operations on the files is NOT done until you tell it to go ahead and perform them. In other words, you can work with all of the files, specifying the operations, and then tell MAINT to execute them all at once. This means that you have time to change your mind and perhaps cancel the operations on one or more of the files that will be acted upon. The syntax to run MAINT is: $ MAINT/qualifier(s) [directory-spec] where [directory-spec] optional starting root directory and optional starting file specification; if not specified, the current default directory will be used and all files in the directory will be included. A file specification will only be in force for the first level of the session; if a sub- directory is selected, all files will be in- cluded. Moving around in MAINT ---------------------- Once you are in MAINT, you move the cursor with the cursor keys (or one of the alternate keys defined to accomplish cursor movement) to the file that wish to act upon. You than select one of the single-keystroke commands and you are prompted for the information necessary. This dramatically cuts down on the typing. To change screens (for directories that take up more than one screen), you press one of the keys defines for Next Screen or Previous Screen. The screen will be updated to reflect the new screen in the dir- ectory, saving any work done on previous screens. The commands to position the cursor on the screen and for changing screens are available via the MAINT/HELP Screen_cursor_commands. Changing directories/viewing files ---------------------------------- To change to a subdirectory, you move the cursor to the directory you desire and Select it. You will be placed on the first screen of the subdirectory and you can then work with the files in that directory. Rest assured that file commands done in the "parent directory" will be preserved until you return to that directory. You can keep going down subdirectories, marking files for action, and then execute them on your way back up. Single file commands -------------------- To perform operations on a file, a single keystroke is needed. The commands (and their associated keystrokes) will appear at the bottom of the screen, the first character of each command being the keystroke needed. The exception being the ^Push command, which actually needs a control-P to be invoked. That is what the "^P" is supposed to signify. Just move the cursor next to the desired file and invoke the command. You will be prompted for any necessary information. The commands to perform single file commands are available via the MAINT/HELP Single_file_commands command. Text descriptors ---------------- MAINT has the ability to maintain extended textual descriptors for files within a given directory. What text descriptors do is allow you to asso- ciate up to a 40-character description with any file in a directory, along with having up to a 60-character description of the directory itself. This is particularly useful when MAINTaining directories with a large number of files. See the MAINT/HELP Text_descriptors command for more information. Other commands -------------- MAINT provides other functions to make life easier on you. For instance, suppose you want to go back to DCL temporarily. The ^Push function (invoked by pressing control-P) will suspend MAINT and place you at DCL in the directory that you were in while in MAINT. Your prompt will be Maint> to indicate that you are running a subprocess. You now have all of DCL's functions available. To return to MAINT, simply type "log" and you will pick up where you left off. To execute the commands that you have made on files in a directory, press the X (eXecute) key. The commands will be executed, informing you of their status, whether it be success or failure. After the commands are executed, the infor- mation for the current directory is rebuilt and the screen will then reflect the new state of the files in the directory. To search for a specific file in the current directory, the Locate command is nice. You will be prompted for a search string and if a file exists with the search string as a prefix, the cursor will be placed next to the file, even if it is on another screen in the directory. To edit an Access Control List (ACL) for a file/directory, simply press the A (ACL) key. You will be placed into the ACL editor for the selected file/ directory. Other features -------------- If you are running MAINT and you receive new mail, you will be notified by a message appearing in the bottom-right corner of your screen. Similarly, if you are being PHONEd, a message will appear in the bottom right corner and MAINT will continue to beep as long as you are being PHONEd. If you wish to read your new mail or answer the phone, just ^Push out of MAINT and do so. Summary ------- MAINT attempts to provide you with a quick and elegant method for maintaining files/directories but does not do eveything that you can do at DCL (at least not at the present time!). It can be a useful tool, however, and any comments/ suggestions/flames are greatly appreciated. Send them to PEIRCE on VMS MAIL. The full help for MAINT can be accessed via the VMS command MAINT/HELP or the H (Help) command when running MAINT. Descriptions of all of the run-time qualifiers and commands are available here, along with other information about running MAINT.