Say I’ve typed out a command in terminal ‘mv *.jpg ..\photos’ and as I’m typing realize I no longer want to execute this command at all. I want to just delete the entire statement. I don’t want to clear the entire screen or delete any bash history I just want to abort the current line and erase it.
Is there a keyboard shortcut or do I have to actually delete each character?
Answer
Assuming you’re in bash, use Ctrl + U.
Attribution
Source : Link , Question Author : Paul Alexander , Answer Author : John T