Page 1 *----------------------------------------------------------------* * * * * * Directory Management and Showfile Manual * * * * * *----------------------------------------------------------------* * Directory Management and Showfile - January 1983 * * Written by John C. Hayre and Denny Thury - Texas Instruments * * Send suggestions and/or complaints to: * * * * Texas Instruments * * P.O. Box 225012, MS 3618 * * Dallas, Texas 75265 * * (Attention John Hayre) * * * * Phone: 214-995-3575 * *----------------------------------------------------------------* Page 2 INDEX 1.0 Introduction 2.0 Directory Management (DM) 2.1 Using Directory Management - An Overview 2.2 Help Key (PF2) 2.3 Keypad Keys 2.3.0 Gold Key (PF1) 2.3.1 Help Key (PF2) 2.3.2 Find Next/Find Keys (PF3) 2.3.3 DCL Key (Gold 7) 2.3.4 Page Key (Key 8) 2.3.5 Forward/Bottom (Key 4) 2.3.6 Backup/Top (Key 5) 2.3.7 Pop (Key 3) 2.3.8 1 Line (Key 0) 2.3.9 Enter 2.4 DM Commands 2.4.0 Up Arrow 2.4.1 Down Arrow 2.4.2 Include Command 2.4.3 Exclude Command 2.4.4 Quit Command 2.4.5 Rename Command 2.4.6 Show Command 2.4.7 Edit Command 2.4.8 Moreinfo Command 2.4.9 Lessinfo Command 2.4.10 Delete Command 2.4.11 Copy Command 2.4.12 Purge Command 2.4.13 Print Command 3.0 Show File (SF) 3.1 Using Showfile - An Overview 3.2 Help Key (PF2) 3.3 Keypad keys 3.3.0 Gold Key (PF1) 3.3.1 Help Key (PF2) 3.3.2 Find String/Find Next (PF3) 3.3.3 General/Exact Search modes (PF4, Gold PF4) 3.3.4 Page/Line N (Key 8, Gold 8) 3.3.5 80/132 (-, Gold -) 3.3.6 Forward/Bottom (Key 4, Gold 4) 3.3.7 Backup/Top (Key 5, Gold 5) 3.3.8 Exit (Key 3) 3.3.9 1 Line/N Lines (Key 0, Gold 0) 3.3.10 Enter 3.4 Other User Keys 3.4.0 Up Arrow 3.4.1 Down Arrow 4.0 Appendix A - Summary of DM Commands and DM Keys 5.0 Appendix B - Summary of SF Keys Page 3 1.0 Introduction To Directory Management And Showfile ____________ __ _________ __________ ___ ________ This is the user's manual for the VAX utilities Directory Managment and Showfile (DM and SF). SF was written by Denny Thury. Later when John Hayre wrote DM he made SF a subroutine so that other programs such as DM could call it. SF is used to look at a file and DM is used to look at directories and to do some of the most common operations on files and directories. SF was written so that a person could page forward and backward through a file. There are other things that you can do from SF, such as searching for the occurence of an ASCII string. DM was written so that a person could walk though the directories of a disk going up and down the directory hierarchy structure, executing various commands, (such as SF), with a minimum number of keystrokes. DM displays all the files in a directory in alphabetic order on the screen. One of the lines is highlighted. Commands are executed by entering one of the single letter commands displayed as a reminder on the bottom of the screen. Here is what the bottom line of the CRT looks like: PF2=help Include eXclude Quit Rename Show Edit Moreinfo Delete Copy purGe Print In the above line, the capital letters are letters that invoke the commands. On the CRT, besides being capital, they are also highlighted. The commands that the person can execute were chosen as some of the most frequently executed DCL commands as well as the SF command. In addition to the commands chosen, the user may execute arbitrary one line DCL commands, (including the DM command!). If a user knows the pathname of any directory on a disk he can examine any directory or file on that disk, (provided he has authorization). The way he does this is by going up and down the tree structure of the directory starting at the known directory pathname. This can be especially helpful if you work with other people and share a common data base. Both SF and DM use the VT100 keypad. The functions of the keypad keys, is similiar to their functions used by the Vax EDT Editor. The help key for both programs is PF2 which will draw a picture of the keypad on the CRT screen with the key functions shown. In this way a user may at any time look at the picture of the keypad to help him remember what the keypad functions are. Then he may return to the program. The DM commands save on the amount of typing that a user must do to execute a command. Here is an example: $ del tempfile.tmp;105 Page 4 This command will delete the file "tempfile.tmp;105. After the file has been deleted, DCL comes back with "$", meaning it is ready for the next command. It takes the user 21 key strokes including the carriage return. In DM this function takes 2 key strokes. DM also gives visual feedback that the command got executed. DM writes "about to delete TEMPFILE.TMP;105". Then it writes "TEMPFILE.TMP;105 deleted". After that the filename disappears from the list of filenames on the CRT. This can also be a helpful human interface. Page 5 2.0 Directory Management _________ __________ 2.1 Using DM - An Overview: _____ __ _ __ _________ ENTERING DM: DM is entered by typing "DM". The one parameter is the directory pathname that you wish to examine. The command "DM []" will examine your default directory. RUNNING DM: After a valid pathname is given, the program will get all the files (including directory files, ie xxxxxxxx.DIR), in the directory and display them on the screen. The top one will be highlighted. The highlighted line is the one that any commands are directed at. There will be one and only one filename highlighted at any time. To make another file the highlighted one, the user can use the up or down arrows, or the keypad keys discussed in depth below. To go to the next higher level directory the user can "pop" the stack. This is done by the "3" key on the keypad. To go to a lower level directory, the user makes the directory name highlighted then enters the S (show), command. EXITING DM: To exit DM the user types either "Q", (Quit) or Control Z, . The user is then returned to the DCL command interpreter with his default directory set at what it was when he entered DM. 2.2 Help Key: (PF2) ____ ____ _____ The help key "PF2" will cause the screen to be erased and a picture of the keypads to be drawn on the CRT. The picture will label each keypad key and give a one line explaination of it's function. 2.3 Keypad Keys ______ ____ 2.3.0 GOLD Key: (PF2) ____ ____ _____ The GOLD key is the 2nd function key. It is never used by itself. It is entered first followed by the function that is desired. For example to go to the last file in the directory, the user types the GOLD key and the "4" key on the keypad. 2.3.1 Help Key: (PF2) ____ ____ _____ As explained above the help key will give the user a picture of the keypad with a reminder of the function of each key. Also, for more help you may type "M" ("More help"), from this screen and a list of each of the single letter commands will be given. The use of the help key is similiar in DM to it's use in the "EDT" editor. 2.3.2 Find Next and Find Keys: (Gold 3, Key 3) ____ ____ ___ ____ _____ _____ __ ___ __ Page 6 These keys act like the find and find next of the "EDT" editor. The find key will prompt the user for the ASCII string which he is searching for. After typing the desired string, his input is terminated with the "ENTER" key. DM will then search in the direction that the user is going through the directory for any occurence of that string in a file name or date or UIC, etc. For example he may search for the string ".lis". DM will highlight the line that contains the 1st occurence of LIS. If the user was going in the reverse direction, ie. keypad key 5 had been entered previously, then the search will be in the reverse direction. This also echoes the use of find and find next for the EDT Editor. There is a basic difference between DM and SF in the search command because SF allows for a generic or exact search while DM maps all characters to upper case. (In fact all the information displayed about the files will be in upper case so if there was an exact search for any string with a lower case character the search would always be fruitless!) 2.3.3 DCL Key: (Gold 7) ___ ____ _____ __ When GOLD 7 is entered, the cursor goes to the bottom of the screen and the "$" prompt is given. The user may enter any one line DCL command. After the command has been executed, the user is notified and the results of the command remain on the screen until the user types a character. At this point the user is returned to the directory that he was examining. The user may execute the DM command and the program is recursively entered. For less typing while doing the one line DCL command, the wildcards "BACKSLASH", (\), and double "BACKSLASH", (\\), can be used. If "BACKSLASH" is used then the filename of the file that is highlighted will be substituted. If the double "BACKSLASH" is used then all the marked files will be substituted with commas between them. Then the program will prompt you to ensure that the substitution is what you wanted. If it is then the DCL will be executed. If not then nothing will happen and you will be returned to the directory that you were examining. This sounds complicated but the program prompts you about the "BACKSLASHES", so that you are shown how to use them. 2.3.3 Page Key: (Key 8) ____ ____ ____ __ The page key is keypad key 8. It is used to advance (in the forward or reverse direction), through the file names in a directory. It causes the next, (or previous), screen of files to be displayed on the CRT. 2.3.5 Forward/Bottom Keys: (Key 4, Gold 4) ______________ _____ ____ __ ____ __ The forward keypad key is key 4. It is used to set the direction as "forward" for pages and searches. Nothing visible happens when it is entered, however, afterward the page key (keypad key 8), will page forward. Also any search will be made in the forward direction starting with the line after the highlighted line. Page 7 The GOLD 4 keypad function will make the highlighted line be the last file in the directory - the same as paging until you got to the last file. 2.3.6 Backup/Top Keys: (Key 5, Gold 5) __________ _____ ____ __ ____ __ Keypad key 5 is the backup key. It does the opposite of the key 4 key. It will set the direction for searches and pages to be "reverse". After it is entered, the search will begin on the line above the highlighted line and search in the "reverse" direction. GOLD 5 will take you back to the 1st file in the directory. 2.3.7 Pop Key: (Key 3) ___ ____ ____ __ This key will take the user out of the current directory, and back to the higher level directory in the heirarchy. For example if he is looking at the directory: "[fred.fortran.apple]" the POP Key will cause DM to go to: "[fred.fortran]". If the user is examining "[000000]" the POP Key will cause it to reread the "[000000]" directory since this is already the top level for the disk. 2.3.8 1 Line Key: (Key 0) _ ____ ____ ____ __ This key will cause the highlighted line to be changed to the next or previous file, depending on the direction that the user is going thought the directory in. (Depending on which of keypad key 4 or keypad key 5 was entered last). 2.3.9 Enter Key: _____ ____ This key is used to terminate prompted input. There is a exception. When there is a "YES" or "NO" question, the program always accepts a single key as the answer. ("Y" is for "YES", anything else is "NO"). 2.4 DM Commands: __ _________ The DM commands are given along the bottom line of the CRT. They are single letter commands that will be explained in more detail below. In general they are the commands that are often used when looking at a directory. The general rule for the commands is that if there are possible bad consequences to the action, the user is prompted to be sure that he really wants to go though with the action. The obvious example is "DELETE". It is used to delete a file or directory. When "D" is entered, the question, "Do you really want to delete the file?" appears on the 23 line of the CRT. If the user types Page 8 "Y" then the file or directory will be deleted. Otherwise, it will not. 2.4.0 Up Arrow Key: __ _____ ____ This key is used to cause the highlighted line to move to the previous file or directory. It will always do this regardless of the direction set by the forward or reverse keys. 2.4.1 Down Arrow Key: ____ _____ ____ This key will make the highlighted line move down to the next file or directory. It will always do this regardless of the direction set by the forward or reverse keys. 2.4.2 Include Command: (Letter "I") _______ ________ _______ ____ There are some operations that may involve several files. The Include command marks files for a future operation. When files are marked there is an asterik, "*", displayed on the screen opposite the filename. If any files are marked when a command that can operate on several files is invoked, the command will operate on all the marked files. Otherwise, it will operate only on the highlighted file. The delete command is an example. The user may mark several files. Then when he enters the delete command (and verifies that he really wants to delete), all the files will be deleted. The commands that can operate on several files are the following: "P" - print file(s) "D" - delete file(s) "C" - copy file(s) 2.4.3 Exclude Command: (Letter "X") _______ ________ _______ ____ In case a mistake is made when marking files, this command will unmark it. The asterik, "*", will disappear and the file will not be operated on by the multiple file operations listed above. 2.4.4 Quit Command: (Letter "Q" or "Control Z") ____ ________ _______ ___ __ ________ ___ This command will cause DM to exit. 2.4.5 Rename Command: (Letter "R") ______ ________ _______ ____ This command will prompt the user to verify that he really wants to rename a file. If the answer is "Y" (meaning Yes), then he is prompted for the new name. In DM all versions of the file will be renamed, not just the version that is highlighted! (If the user desires to rename only one version then he can use the DCL command - GOLD 7 discussed above.) 2.4.6 Show Command: (Letter "S") ____ ________ _______ ____ Page 9 This is the most frequently used command in DM. It causes one of two actions. If the highlighted line is a directory, then it causes that directory to be examined. The screen is erased, and all the files of the new directory are displayed. If the highlighted line is a filename then Showfile is executed for that file. See section 3 for details about showfile. 2.4.7 Edit Command: (Letter "E") ____ ________ _______ ____ This command causes the editor to be called in and the user can then edit the file. Upon exit from the editor, the user is returned to DM displaying the directory that he was in prior to the edit. (If the highlighted line was on a directory then DM will go to that directory.) As stated in the installation notes, there must be a proc named "ED" installed in the system for this command to work. 2.4.8 Moreinfo Command: (Letter "M") ________ ________ _______ ____ This command causes DM to reread the directory extracting more information about each file. The new information is displayed when it is finished. The new information includes the time and date that the file was created, the UIC of the owner, the protection status and the file size. Here is and example line from DM with "MOREINFO" turned on. TEMPFILE1.LIS;109 1092 24-FEB-83 10:23 [230,001] (RWED,RWED,RWE,RE) If a search is made using the "FIND" or "FIND NEXT" commands, this new information about the file will also be searched. In the example above, a search for "230" would find this file. The user may search for any file created in the month of MAY by searching for the ASCII string "MAY". The default DM mode of operation is to suppress this extra information because it makes the program run slower. (The program must open and close each file in the directory to get this information!) 2.4.9 Lessinfo Command: (Letter "L") ________ ________ _______ ____ This command makes DM run faster by not going out and getting all the added information needed in the "MOREINF" command. This is the default mode. 2.4.10 Delete Command: (Letter "D") ______ ________ _______ ____ This command will allow the user to delete a file or directory. It first prompts the user to ensure that he really wants to delete the file or files. If he answers "Y" for yes, then any marked files are deleted. If there are no marked files, then the highlighted file is deleted. If a directory is to be deleted, the user is prompted again. This prompt asks if Page 10 he wants to verify each file before deletion, abort the delete command, or delete all this directory's files without verification. After attempting to delete each file and subdirectory of a directory the directory itself is deleted only if it is now completely empty. A directory is completely empty when all it's files have been deleted, all it's subdirectories and their files, and their subdirectories, etc. If there are still files or subdirectories under it then it is not deleted. If the user wishes to verify each file before deleting, then the user is given a prompt for each deletion. The prompt asks if you want to delete it, leave it alone, or exit the delete command. Note: If any files or directories are delete protected, the program will not delete them or their "fathers". 2.4.11 Copy Command: (Letter "C") ____ ________ _______ ____ This command will copy any file or files into another file leaving the copied file in its original state.). It first prompts you to ensure that you really want to copy a file. If the answer is "Y", (meaning yes), then it prompts you for the name of the file to copy into. If a simple file name is given the the directory that is being examined is the directory of the new file. Otherwise, it will take any valid pathname for the new file. This command does nothing to directory files. When files are marked with the Include command, the Copy command will concatenate together into the new file. 2.4.12 Purge Command: (Letter "G") _____ ________ _______ ____ This command is invoked with the "G" key. (The "P" key is used for the print command.) This command will prompt you to ensure that you really want to purge this directory. If you answer "Y", (yes), then each file that is a canidate to be deleted will be displayed. It will then begin deleting them. (In case you Really screwed up, you can enter Control Y to get ______ out of DM or "NO SCROLL" to study the situation farther). 2.4.13 Print Command: (Letter "P") _____ ________ _______ ____ This command is invoked by the "P" key. It will prompt the user ("do you really want to print the file(s)). If you answer "Y", (yes), then it prints all the marked files. If there are no marked files, then it prints the highlighted file. If directories are marked then it does nothing to them. Page 11 3.0 Show File ____ ____ 3.1 Using Showfile - An Overview: _____ ________ _ __ _________ ENTERING SF: SF is entered by typing "SF". There is one parameter which is the file pathname that you wish to examine. (You will be prompted for the pathname if it is not found on the DCL command line.) RUNNING SF: After a valid pathname is given, the program will display the first 23 lines of the file. The cursor will be on the top line. The reminder that PF2 is the help key will be on the bottom line. Also on the bottom line will be the pathname of the file that you are looking at. On the far right of the bottom line will be the top and bottom line numbers that you are looking at. At this point you may search for an ASCII string, page through the file, or go through the file line by line with the up and down arrows. There are several other functions defined by the keypad keys that are discussed in depth below. EXITING SF: To exit SF the user types either Control Z, or the "3" key on the keypad. 3.2 Help Key: (FF2) ____ ____ _____ The help key "PF2" will cause the screen to be erased and a picture of the keypads to be drawn on the CRT. The picture will label each keypad key and give a one line explaination of it's function. 3.3 Keypad Keys ______ ____ 3.3.0 GOLD Key: (PF1) ____ ____ _____ The GOLD key is the 2nd function key. It is never used by itself. It is entered first followed by the function that is desired. For example to go to the last record of a file, the user types the GOLD key and the "4" key on the keypad. 3.3.1 Help Key: (PF2) ____ ____ _____ As explained above the help key will give the user a picture of the keypad with a reminder of the function of each key. The use of the help key is similiar in SF to the "EDT" editor's help key. 3.3.2 Find Next and Find Keys: (Gold PF3, PF3) ____ ____ ___ ____ _____ _____ ____ ____ These keys act like the find and find next of the "EDT" editor. The find key will prompt the user for the ASCII string which he is searching for. After typing the desired string, his input is terminated with the "ENTER" key. SF will then search for the 1st occurance of that string in any record. SF Page 12 will put that record on the 2nd line of the CRT and reverse video all occurances of the string that occur on the CRT. If the user was going in the reverse direction, ie. keypad key 5 had been entered previously, then the search will be in the reverse direction. This also echoes the use of find and find next for the EDT Editor. (When going in the forward direction, after displaying all the occurances of the string in reverse video, the search will begin on the last line that is displayed on the CRT.) 3.3.3 General/Exact Keys: (Gold PF4, PF4) _____________ _____ _____ ____ ____ In SF unlike DM or the editor, you may search for an exact string. To do this, GOLD PF4 will set the search mode to exact. PF4 (no GOLD) will reset the search back to generic. With a Generic Search uppercase and lower case make No _______ ______ __ Difference. With an Exact Search upper and lower case DO make __________ _____ ______ __ ____ a difference. (For example an exact search will not find the _ __________ string "ABC" if the search string is "ABc".) 3.3.4 Page/Line N Keys: (Key 8, Gold 8) _________ _ _____ ____ __ ____ __ THE PAGE KEY (KEYPAD KEY 8) This key will cause SF to go to the next page of the file. The direction that is paged is determined by the last direction key that is entered (the direction keys are keypad keys 4 and 5 discussed below). THE LINE N KEY (KEYPAD GOLD 8) This key will prompt you for the record number in the file to go to. (The current top and bottom record numbers are always displayed on the CRT on the bottom line to the right.) After the requested line is entered, that line will become the top line of the displayed file. 3.3.5 80/132 Characters/Line Keys: (-, Gold -) ______ _______________ _____ ___ ____ __ These keys redefine the VT100 characters/line option. The VT100 allows for either 80 or 132 characters per line. This key will redefine the VT100 characteristics that change this. NOTE: The terminal will be left in whatever mode the user last put it in when it returns from the SF program! 3.3.6 Forward/Bottom Keys: (Key 4, Gold 4) ______________ _____ ____ __ ____ __ The forward key (keypad key 4) sets the search and page direction to advance in the "forward" direction through the file. The GOLD 4 or Bottom key will cause the SF program to display the last records, ("page"), of the file. 3.3.7 Backup/Top Keys: (Key 5, Gold 5) __________ _____ ____ __ ____ __ The backup key (keypad key 5) will set the search and page direction to "reverse". Paging with the page key (keypad key 8) will then cause the previous page of records to appear on Page 13 the CRT rather than the next page of the file's records. The GOLD 5 or Top key will cause the CRT to display the 1st records of a file. 3.3.8 Exit Key: (Key 3) ____ ____ ____ __ The keypad key 3 is the only way to exit the SF program. 3.3.9 1 Line/N Lines Keys: (Key 0, Gold 0) _ ______ _____ _____ ____ __ ____ __ The 0 keypad key will cause the SF program to advance or backup one line. The direction (advance or backup) is determined by the last direction key (keypad key 4 or 5) to be entered. The GOLD 0 keypad key will cause a prompt to ask you: "No. of lines?" The SF program will add the number of lines you entered to the top line (displayed in the lower right of the CRT display) if you are advancing though the file. It will subtract the number of lines you entered from the top line if you are going in the reverse direction. This newly calculated number will become the record number of the record that is displayed on the top line of the CRT. 3.3.10 Enter Key: _____ ____ This key is used to terminate input to questions that SF asks you. 3.4 Other User Keys: _____ ____ _____ 3.4.0 Up Arrow Key: __ _____ ____ This key will cause the file to be rolled so that the record displayed on the top of the CRT will be one LESS than ____ what it currently is. (The CRT will scroll down and a new top line will appear.) 3.4.1 Down Arrow Key: ____ _____ ____ This key will cause the file to be rolled so that the record displayed on the top of the CRT will be one MORE than ____ what it currently is. (The CRT will scroll up). Page 14 4.0 Appendix A Summary of DM Commands ________ _ _______ __ __ ________ ------------------------------------------------------- DM Commands: ------------------------------------------------------- I = Include - used to mark a file or directory for Copy, Print, or Delete commands. * = Same as I above. X = Exclude - after marking a file or directory this will unmark it. Q = Quit DM. (Go back to the command language) Control Z = Quit DM. (Go back to the command language) R = Rename a file or directory. S = Show file or directory (If the highlighted line is a file then showfile is called. If it is a directory then DM will go to that directory. E = Edit the file. M = Give more information about each file. L = Reverse "M"ore command. D = Delete the marked files. If none are marked, then delete the highlighted file. Files and directories will not be deleted if they are protected. When deleting directories, all the subdirectories and their files will be deleted. C = Copy marked files into a file, or copy the highlighted file if none are marked. G = Purge the directory that you are looking at. P = Print the files that are marked, or the one that is highlighted if none are marked. ------------------------------------------------------- Keypad keys used in DM ------------------------------------------------------- PF1 (GOLD) Key = Used in combination with other keypad keys for second functions. PF2 Key = Help command - Describes commands and keypad keys. PF3 = Find next string. Find 1st occurence of the string. GOLD PF3 = Find string (like the editor). It will prompt you for the string to find - the enter key terminates your search string. GOLD 7 = DCL - allows the user to do one line of DCL and return to DM when done. (You can also do another DM command!) 8 = Page forward or backward through the file pathnames depending on the preset direction. 4 = Set the page and search direction to forward. GOLD 4 = Go to the last file in this directory 5 = Set the page and search direction to reverse. GOLD 5 = Go to the 1st file in this directory. 3 = Go one level up in the directory hierarchy, (pop the stack). 0 = Advance to the next/previous file depending on the preset direction. Enter Key = Used to terminate any prompted input. Up Arrow = go to the next file regardless of the preset direction. Page 15 Down Arrow = Go to the previous file regardless of the preset direction. Control A = Regardless of the preset direction page forward. Control B = Regardless of the preset direction page backward. Page 16 5.0 Appendix B Summary of SF Commands ________ _ _______ __ __ ________ ------------------------------------------------------- Keys used in SF ------------------------------------------------------- PF1 (GOLD) Key = Used in combination with other keypad keys for second functions. PF2 Key = Help command - Will describe all the SF keys. PF3 = Find next string (like the editor). GOLD PF3 = Find string (like the editor). It will prompt you for the string to find - (the enter key terminates your search string). PF4 = Set the find string search mode to general search (map lower case to upper case). GOLD PF4 = Set the find string search mode to exact (do not map lower case letters to upper case). 8 = Page forward or backward through the file (depending on the preset direction). GOLD 8 = Prompts you for the file's line number to go to. - = Change the terminal to 80 columns. GOLD - = Change the terminal to 132 columns. 4 = Set the page and search direction to forward for paging and string searches. GOLD 4 = Go to the last record of this file. 5 = Set the page and search direction to reverse for paging and string searches. GOLD 5 = Go to the 1st record of this file. 3 = Quit SF. Control Z = Quit SF. 0 = Advance to the next/previous record of the file (depending on the preset direction). Enter Key = Used to terminate any prompted input. Up Arrow = Regardless of the preset direction advance to the next record of the file. Down Arrow = Regardless of the preset direction go the previous record of the file. Control A = Regardless of the preset direction page through the file in the forward direction. Control B = Regardless of the preset direction page backward thru the file.