Due to the vagaries of virtualbox's clipboard I ended up pasting a huge logfile into the terminal instead of a small snippet of text.

At this point, as the log file contains many newlines etc. it goes absolutely mad trying to execute each line as a command... as you may imagine this is both undesirable and can take some time.

Ctrl+C doesn't work here as it just moves on to the next line of the pasted file - so what (if anything) is the magic Vulcan nerve pinch required to stop the terminal completely?

  • 2
    Search for bracketed paste. I use zsh, which includes it by default, but I think it's now in bash? – Sparhawk May 12 '17 at 12:32
  • 1
    @Sparhawk Yes it is also available since bash-4.4 / readline-7.0. – egmont May 12 '17 at 20:08
  • 1
    As for the original question: Holding down Ctrl+C often helps me in this case. Other than that, you can close the terminal emulator window or tab. – egmont May 12 '17 at 20:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.