The bash shell has several convenientĀ line editing features: - use the Up arrow to scroll back through the command line history; Down arrow goes forward
- use Ctrl-a to move the cursor to the beginning of a line; Ctrl-e to the end
- use Backspace to remove text before the cursor; Delete to remove text after the cursor
- Ctrl-k ("kill") to delete all text on your command line after the cursor
- Ctrl-y ("yank") to copy the last killed text to where the cursor is
Once the cursor is positioned where you want it: - Just type in any additional text you want
- To delete text after the cursor, use:
- Delete key on Windows
- Function-Delete keys on Macintosh
- To delete text before the cursor, use:
- Backspace key on Windows
- Delete key on Macintosh
(Read more about Command line history and editing) |