Follow up on How to reset a broken TTY?, to fix the terminal after displaying a binary file,
I've tried all solution there, as well as those from https://unix.stackexchange.com/questions/79684/
But my case is still not covered --
- the command clear is not clearing screen
- using arrow-up key to see previous commands, but if there is a shorter command comes after a longer one, the longer part still remains
to reproduce the case:
cat /bin/ls
clear
# clear is not clearing screen
How to fix that?
PS, my system:
$ lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux bullseye/sid
Release: testing
Codename: bullseye
$ echo $TERM
screen
I.e., it's screen session running under xterm.