Every once in a while on a computer I'm ssh'd into, I will accidentally type "cat largefile.txt" and my screen will start rushing with text for the next 10 minutes. I'm always working in a screen session, so my current solution is to just log out and then log back in, and since it can go 100X faster when I'm logged out, it'll finish in the short time it takes me to type my password in again.
Is there a better way? Either involving the fact I'm in a screen session? Or a way to do this within SSH?
What doesn't work:
- detaching from the screen session (doesn't respond until file is done outputting)
- trying command to move to a different window in the screen session (also doesn't respond)
- typing ctrl+C to kill cat command (also doesn't respond, probably because the command is done and the buffers just have to catch up)