Function Keys
Certain function keys are engrained in our minds from the DOS days. Many
function keys perform the same action in NT as they did in DOS. Table 1, page
170, lists the function and related keys available at the NT command prompt, as
well as the actions they perform. I will explain the less obvious function keys,
and the keys I find particularly useful.
F2: Character to copy to. The F2 key is handy for repeating
parts of lengthy or complex command lines. You can use F2 to copy the current
command in the history buffer to the command prompt, up to the first occurrence
of the character you specify. Press F7 to see the current command. You can use
the up and down arrow keys to change the current command.
Suppose the current command in the history buffer is cd "\program
files\plus!", and you want to move one directory level up to the NT
directory. Directories with spaces in their names are cumbersome to type because
they require quotation marks. To save time, perform the following steps. Press
F2 and enter
p
to copy the line up to but not including the first p. The command line then
contains cd "\. Press F2 again and enter
p
to copy the line to the next occurrence of p. The command line then contains
cd "\program files\. To complete the command, type
Windows NT"
F4: Character to delete up to. The F4 key is a quick way to
delete characters to the right of the cursor. Suppose you enter a lengthy path
to change your directory to. As you execute the CD command, you realize that you
haven't created the directory. You can recall the CD command with the long path,
place the cursor at the beginning of the line, use F4 to delete up to the path,
and enter the MD command to create the directory.
For example, the original CD command is C:>CD \WINNT\SYSTEM32\
INF\TEMP. To bring back the command, press the up arrow. Press the Home key to
move the cursor to the beginning of the line. Press F4 and then press the
spacebar to delete the command, up to but not including the space. The command
is then C:> \WINNT\SYSTEM32\INF\TEMP. Make sure you are in insert mode, enter
MD
and execute the command (i.e., C:>MD \WINNT\SYSTEM32\INF\TEMP).
In this simplified example, you can just as easily use the delete or
backspace key to remove the CD command. However, F4 saves time when you need to
delete a long string.
F7: Show command history. If the command history is long,
you'll find it inconvenient to go through old commands individually. To view the
entire list, press F7. You'll see a pop-up window such as the one in Screen 4.
You can use the up and down arrows to move through the list of commands, or you
can use Page Up and Page Down to scroll faster. You can press Esc to cancel the
list without taking action.
Press Enter to execute a highlighted command. The command you execute then
becomes the current command in the history buffer. Thus, subsequent actions that
relate to the history start from this command.
F8: Show previous command with search capability. If you
have nothing at the command prompt, you can use the F8 key as an up arrow. Press
F8 to scroll through the command history. F8 does not stop when it reaches the
top of the list but rotates to the bottom. F8 is also useful for finding
previously executed commands. To find dir commands, type di at the command
prompt and press F8. The prompt cycles through the command history and shows
commands that start with di.
F9: Jump to command number. Scrolling through old commands
is time consuming. You can use the F9 key to jump to a command. You must first
use F7 to determine the command number. F9 is useful for repetitive work when
you have to recall a command many times. F9 places the command at the prompt
without executing the command, so you can modify it if necessary. You can use F9
while viewing the command history list. Suppose you see a command in the history
list that is close to the command you want. Press F9 and enter that command
number. This action places the command at the prompt, and you can then modify
the command.
Make Yourself at Home
Customizing the command prompt saves you time in administering NT. In
addition, if you miss the UNIX or OS/2 prompts, you can emulate many of their
features.
End of Article
Prev. page
1
[2]
next page -->