Macos – Clear command from terminal in OS X

macosterminal

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?

Best Answer

Assuming you're in bash, use Ctrl + U.

Related Question