When you think everything is lost…

I have seen people many times doing something like this:

$cat binary_file

The problem with the above is that usually you end up with a prompt that looks like this:

�g`�g���i`�i��k`�kX@l`(l  �

Whatever you type, you get garbage in your terminal. In this case, what most people do is to despair and close the terminal, losing the information contained in it.

reset is a command that gets the terminal back to its normal state. Sometimes everything is so mangled that there is no echo from the terminal. Don’t panic, just type reset and press ENTER.

If ENTER does not work, try to replace it by Ctrl-J

If none of the above works… you can fallback to your initial idea and close the terminal.