You have typed a long line of command in terminal. But now you want to clear or delete the entire line. Deleting each character in the command will take sometime and bored you. So are there any keyboard shortcuts that allow you to do this? Yes there are some hotkeys to the rescue.
|CTRL + u||Delete the current command.
The deleted command will be stored into a buffer.
|CTRL + w||Delete a word.|
|CTRL + c||Abort what you are typing.|
|CTRL + d||Delete current character.|
Other hotkeys that might help you work faster in the terminal.
|CTRL + e||Move to the end of line.|
|CTRL + a||Move to the start of line.|
|CTRL + k||Cut text from the cursor to the end of line.|
|CTRL + y||Paste the last cut text or buffer.|
|CTRL + -||Undo.|
|CTRL + b||Backward one character.|
|CTRL + f||Forward one character.|
|ALT + ←||Backward one word.|
|ALT + →||Forward one word.|
- How do I compile and execute a JDK preview features with Maven? - December 8, 2023
- How do I sum object property using Stream API? - December 7, 2023
- How do I iterate through date range in Java? - October 5, 2023