0

Please understand this question like a "Have you experienced the same phenomenon?". When I display a binary file with tail or less, my Terminal gets completely messed up. All I can do is reboot the raspi. On my PC or laptop displaying binary files on the Terminal does not cause similar problems. What could be the reason? And, how can I fix this?

1

To fix the problem enter the command

reset

Don't worry if funny characters are echoed back as you enter the letters.

Linux terminals actually emulate old fashioned VT type terminals. Certain control characters and sequences are used to change cursor position, screen colour, and such things as display language. By writing binary to the screen you are inadvertently setting up a funny mode.

Have a look at VT100 terminal emulation to get an idea of what is going on.

http://www.termsys.demon.co.uk/vtansi.htm

| improve this answer | |
1

The answer by @joan is correct, but you have not locked up the Pi, merely put the terminal display into a different mode (or possibly paused output with XOFF which can be resumed with XON i.e. CTRL+Q).

If you have a reason to look at a binary file you can use cat -v which displays non printable characters so they are visible. There are many editors which do a good job of displaying files in hex.

| improve this answer | |

Your Answer

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

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