If you were running cat on the actual ksh binary file, then you were seeing the raw machine code of the ksh program being interpreted as if it was human-readable text. Of course, it wasn't, so the characters displayed were random characters from your terminal's character set, plus control and other non-printable characters.
Some of the control characters in a binary file can mess up your terminal's state. If you close the connection, that's fine, but you can also recover without closing your connection by pressing control-C to stop the process and then typing "reset" and pressing enter.
You missed the command! – Andreas Florath – 2012-05-11T18:27:00.893
No, he failed at formatting. Fixed that. – larsks – 2012-05-11T18:29:05.423
1Dude, that's what happens when you "cat" a binary file :) – paulsm4 – 2012-05-11T18:29:35.593
If you're up for a real thrill, try to "type" an .exe in a Windows command prompt. You'll get the Latin and Greek letters, the symbols, and it will even beep at you, too! ;) – paulsm4 – 2012-05-11T18:31:20.850
Not sure that this is a programming question; perhaps superuser would make more sense? – Charles Duffy – 2012-05-11T18:33:26.823
You can also use the "strings" command to see the text in a file:
cd /bin;strings ls|less– paulsm4 – 2012-05-11T19:50:48.097