Hi list, I'm constantly opening binary files using cat from the command line by mistake, then after quitting out the console displays all text in weird symbols. Is there anyway to reset the console when this happens? Thanks, Jen.
On Fri, 26 Apr 2002 Jenny_Hopkins@toby-churchill.com wrote:
I'm constantly opening binary files using cat from the command line by mistake, then after quitting out the console displays all text in weird symbols. Is there anyway to reset the console when this happens?
You'll kick yourself for this one :-)
Type (blindly):
reset
HTH,
Andrew.
For safety, type reset ^J <CR>, which is ^M, might not be recognised. It depends on just how messed up your terminal settings are.
On 26-Apr-2002 Andrew Savory wrote:
On Fri, 26 Apr 2002 Jenny_Hopkins@toby-churchill.com wrote:
I'm constantly opening binary files using cat from the command line by mistake, then after quitting out the console displays all text in weird symbols. Is there anyway to reset the console when this happens?
You'll kick yourself for this one :-)
Type (blindly):
reset
HTH,
Andrew.
-- All views are my own .... who else would want them?
main@lists.alug.org.uk http://www.anglian.lug.org.uk/ http://lists.alug.org.uk/mailman/listinfo/main Unsubscribe? See message headers or the web site above!
on Fri, Apr 26, 2002 at 09:37:50AM +0100, Jenny_Hopkins@toby-churchill.com wrote:
I'm constantly opening binary files using cat from the command line by mistake, then after quitting out the console displays all text in weird symbols. Is there anyway to reset the console when this happens?
Others have mentioned the handy 'reset'; zsh has a neat feature (well, it has several):
ttyctl -fu The -f option freezes the tty, and -u unfreezes it. When the tty is frozen, no changes made to the tty settings by exter- nal programs will be honored by the shell, except for changes in the size of the screen; the shell will simply reset the settings to their previous values as soon as each command exits or is suspended. Thus, stty and similar programs have no effect when the tty is frozen. Without options it reports whether the terminal is frozen or not.
Using less rather than cat can save time too, as it can display binary files in a bearable format.
On 26-Apr-02 Jenny_Hopkins@toby-churchill.com wrote:
Hi list, I'm constantly opening binary files using cat from the command line by mistake, then after quitting out the console displays all text in weird symbols. Is there anyway to reset the console when this happens? Thanks, Jen.
There is a command -- "reset" -- which sometimes works and sometimes doesn't in these circumstamces.
If it doesn't work, the only cure I've found (in an xterm) is to kill it and open a new one.
In the console, which is "opened" on boot, I'm not sure that there is a cure if "reset" doesn't work!
Good luck, Ted.
-------------------------------------------------------------------- E-Mail: (Ted Harding) Ted.Harding@nessie.mcc.ac.uk Fax-to-email: +44 (0)870 167 1972 Date: 26-Apr-02 Time: 10:11:44 ------------------------------ XFMail ------------------------------
On Fri, 26 Apr 2002 Jenny_Hopkins@toby-churchill.com wrote:
Hi list, I'm constantly opening binary files using cat from the command line by mistake, then after quitting out the console displays all text in weird symbols. Is there anyway to reset the console when this happens? Thanks,
Usually: stty sane or for bad cases: printf "\017"
What's this newfangled "reset" thingy do???
wbh W.B.Hill@uea.ac.uk wrote:
What's this newfangled "reset" thingy do???
I don't know. I just press the little black "reset" button on the front of the terminal and wait for the green cursor to start blinking again.
On Fri, 26 Apr 2002 11:05:53 wbh wrote:
On Fri, 26 Apr 2002 Jenny_Hopkins@toby-churchill.com wrote:
Hi list, I'm constantly opening binary files using cat from the command line by mistake, then after quitting out the console displays all text in weird symbols. Is there anyway to reset the console when this happens? Thanks,
Usually: stty sane or for bad cases: printf "\017"
What's this newfangled "reset" thingy do???
Each type of terminal has a definition as part of the terminfo database and part of that definition is an initialisation string to be sent to the terminal to get it to a known state. The reset command resets the kernel tty driver state for the terminal first (translations and special characters) and then sends the init string from the terminfo database.
There is more info in the man entry for reset.
Steve.
On Fri, Apr 26, 2002 at 09:37:50AM +0100, Jenny_Hopkins@toby-churchill.com wrote:
Hi list, I'm constantly opening binary files using cat from the command line by mistake, then after quitting out the console displays all text in weird symbols. Is there anyway to reset the console when this happens?
Type <ctrl>-v <ctrl>o <return>
That always works for me, even in those weird cases where "reset" and "stty sane" fail.