Get Your Command Line Groove On

Commonly forgotten Windows DOS prompt shortcuts

Key What it Does
F1 Fills in the letter from last command you entered, one letter at a time.  Useful for fixing a typo on a command you just entered. 

For example, if I enter cd "My Docements" which wont work, I can then press F1 10 times (or hold it down) to get cd "My Doc then press the u to correct the typo.  Then hold F1 to get the remaining characters of the last command.  cd "My Documents"

F2 Prompts the user for a letter and fills in the last command up to the letter you entered.  This saves  you holding down the F1 key to get to the dodgy letter.

Using the last example again, if I press F2 then press e, the line buffer is filled to cd "My Doc.  You can then enter u and then press F2 followed by " to get to the rest of the entry.  cd "My Documents"

F3 Fill last command from current cursor position to the end of the line.

So taking from the previous example, after you enter u, you can press the F3 key to fill in the remainder of the line.

F4 Delete forwards up to a specified character. 
With the cursor positioned at the beginning of the line cd "My Documents", pressing F4 then u, will delete up the first few characters, leaving you with a line uments"
F5 Go back through history. Equivalent to the up arrow
F6 ????  CTRL+Z
F7 Display the command history, use the cursor keys to navigate and hit enter to reuse the relevant command.
F8 Go back in history
F9 Re-issue a previous command.  Prompts for the command number (from the list that appears when you press F7)


References (and some other tips)

Leave a Reply