NetWare's EDIT.NLM, Revisited
Novell Cool Solutions: Tip
By Jack Shreve
Digg This -
Posted: 1 Nov 2007
NetWare's EDIT.NLM, Revisited - How To Do All This From the Server Console:
- Easily Finding and/or Replacing specific text in NetWare NCF, java config, and other NW text files.
- Quickly getting to the end or beginning of lengthy text files.
- Quickly finding files and editing files, without knowing the complete file name.
- Alternate ways to make EDIT.NLM work for you.
- Trying to determine if and where a command or variable exists in an NCF or other NetWare text file can be a trial.
Starting with NW6, assuming you are SP'd up to SP3, EDIT.NLM includes both the "Find" and "Find And Replace" functions. (If it doesn't work, download or copy the NLM from a later NW6 source to the SYS:\SYSTEM directory)
"Find" functions are invoked by CTRL+F while you are editing a file. You may enter all or a part of the word or phrase you are looking for. Wild cards are not supported; indeed, they are treated as a normal character. For example, trying to find "Jack" returns all results including Jack, whereas "JACK*" would come back with nothing - unless there actually was a term JACK followed by that asterisk. The same is true of wild card "?".
To start the "Find", type in the term you want, press Enter, select whether you want to search Down or Up, then press the ESC key. You will be taken to the first instance of your search term.
To find any additional occurences, press the F3 function key. When there are no more matches, a pop-up of that lovely NetWare lavendar color will tell you so.
"Find and Replace" works the same as the "Find" function, but is invoked with CTRL+R. It, too can be set to be case sensitive; I have found this to be extremely useful to fix consistently mis-cased words, such as is caused by CAPS-LOCK.
- Sometimes at the server console you may want to get to the end or beginning of a lengthy file, and PGDN/PGUP would take a lot of keystrokes. To get to the end of any file, Press CTRL+PGDN. To the beginning, CTRL+PGUP.
- Although many of us have a utility like CPQFM.NLM at our disposal, sometimes we don't. In the past we had to type something like "EDIT SYS:\SYSTEM\ABEND.LOG". All we need do now is type "EDIT", press the INS key, select the drive (including any available DOS drives like C: or D:) and browse to the desired file. You can easily navigate to where you need to be by typing in only as many letters as are needed to eliminate any other candidates. (Unlike in MS Windows Explorer browsing, you can type past a couple letters, and you needn't be a speed-typist to do so.)
- Tips you already knew, but want to pass to the new, junior staff person:
- In EDIT.NLM, you highlight text by pressing F5 and then selecting it. To Cut, just press DEL. To Paste press INS. You can also copy by pressing F6. I find it faster and easier when I want something in the server "clipboard" to do a quick DEL+INS. A quick two finger-roll.
- "EA" is an alias that brings up the AUTOEXEC.NCF for editing.
- You can create an alias for files you often need to edit or view by typing the following at the server console: (Do not include quotes)
"Alias <desired command> <actual command>"
See the example #2, below.
We have all had the opportunity to have to sift through miles-long ABEND logs, looking for each instance and time of when the server ABENDed.
To find the Last ABEND in the log, bring it into EDIT and press CTRL+PGDN to get to the end. THEN, bring up Find fuction (CTRL+F)
If you often need to run the "DSREPAIR -RC" command, you can create an alias to run the command by typing something like "DSRC"; to do so simply type "ALIAS DSRC LOAD DSREPAIR -RC". No quotes are needed. One nice thing is that, once you enter this on a server, it will stay in effect, even if the server is rebooted.
- You must do this on every server you want this to run on.
- Although the command that you alias can be any valid server console command, including several words, switches, etc (see example above) the alias itself has to be a single term.
All versions NetWare versions, NW6 SP3 and beyond.
Novell Cool Solutions (corporate web communities) are produced by WebWise Solutions. www.webwiseone.com