The command-line editor enables you to position the cursor anywhere in a partially typed command and insert characters at the cursor position.
You can use various key combinations to move the cursor within the same line and edit the command, as shown in the following table.
If you want to... | Then press ... |
---|---|
Move the cursor right one position | Ctrl-F or the Right arrow key |
Move the cursor left one position | Ctrl-B or the Left arrow key |
Move the cursor to the end of the line | Ctrl-E |
Move the cursor to the beginning of the line | Ctrl-A |
Delete all characters from the cursor to the end of the line | Ctrl-K |
Delete the character to the left of the cursor and move the cursor left one position | Ctrl-H |
Delete the line | Ctrl-U |
Delete a word | Ctrl-W |
Reprint the line | Ctrl-R |