$ execute_some_long_command
<command is executing>
<Accidently press middle button that inserts bunch of garbage (including, for example, `rm -Rf ~/*`) into console>

How to let execute_some_long_command finish, but not execute inserted things?

link|improve this question

64% accept rate
feedback

1 Answer

up vote 4 down vote accepted

Type Ctrl-Z (goes back to prompt, doesn't execute keyboard buffer) and then fg to get the running execute_some_long_command back on track.

At least that worked in my Fedora 14 gnome-terminal, testing with "sleep 20" as execute_some_long_command and "echo blah" as the typed garbage.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.