Ctrl + U should help you.
Below are the rest of the options available.
Grabbed from here
UNIX understands several control-key commands, commands you enter by holding down the control key (ctrl) while striking a second key
CTRL + S - freezes the screen and stops any display on the screen from continuing
(equivalent to a no-scroll key) (sometimes takes a moment to work)
CTRL + Q - un-freezes the screen and lets screen display continue
CTRL + C - interrupts a running program
CTRL + \ - same as CTRL - C but stronger (used when terminal doesn't respond)
CTRL + Z - suspends a running program (use the fg command to continue the program, see s$
CTRL + H - deletes last character typed
CTRL + W - deletes last word typed
CTRL + U - deletes last line typed
CTRL + R - searches text from history
CTRL + D - ends text input for many UNIX programs, including mail and write.
Note:
When we delete using CTRL + W or CTRL + U, we are also performing a (edit) "cut" (yank in) operation (delete and store in buffer/clipboard). To paste (yank out) the string in buffer/clipboard, use CTRL + Y.
bash
(and several other shells) to understand vi keys:set -o vi
. You could then doesc
,dd
(or otherwise edit/replace as you could do in vi[m]).ls
)and then backspace - this usually only a couple of key strokes so it isn't that big a' deal.