Ivorde Unix/Linux/Database/Web/Mail Forum

View unanswered posts
View active topics
It is currently Wed Feb 08, 2012 8:26 am


Tutorials applicable on more than one Unix/Linux OS and shell scripts: ssh / openssl / protocols.

Bookmark this article:

Author Message
debuser
Post  Post subject: Normalizing terminal prompt (or putty prompt) after catting a binary file  |  Posted: Wed Aug 04, 2010 10:44 am

Joined: Thu Aug 06, 2009 9:48 am
Posts: 90

Offline
Save on Delicious
Some binaries or some command output (unexpected) can contain control sequence which can cause a terminal to interpret it as changing character set. That's why the prompt becomes unreadable and keystrokes abnormal (lines).

To fix this, there are few possible solutions:
Code:
$ echo -e '\017'

or
Code:
$ reset
(NOT REBOOT)
or
Code:
$ stty sane


Top
debuser
Post  Post subject: Re: Normalizing terminal prompt (or putty prompt) after catting a binary file  |  Posted: Thu Aug 05, 2010 12:39 am

Joined: Thu Aug 06, 2009 9:48 am
Posts: 90

Offline
Code:
[root@server]$ cat /etc/localtime
'5´à'õ
`(äû`)Ôì`*ÄÝ`+´Î`,¤¿`-$ à-°`.
                             P/t`0duP1]®à2r{Ð3=»4R58Ýa9ûv:½C;ÛX<¦_=»:>A?@f#A
                                                                            9BFCd
                                                                                 
E⎼▒⎽␊ ⎽␊├ ├⎺ ␉▒␌┐⎽⎻▒␌␊.
[⎼⎺⎺├@┬┬┬ /┤⎽⎼/⎻⎺⎼├⎽/┌▒┼±/⎻␤⎻5-␊│├␊┼⎽␋⎺┼⎽]# ␊␌␤⎺ -␊ '\017'

[root@server]$

After echo -e '\017' the terminal prompt is fixed.


Top
Display posts from previous:  Sort by  
Print view

Topics related to - "Normalizing terminal prompt (or putty prompt) after catting a binary file"
 Topics   Author   Replies   Views   Last post 
There are no new unread posts for this topic. Fix shell terminal after cat-ing a binary or echoing some encrypted content

admin

0

752

Thu Mar 03, 2011 12:58 pm

admin View the latest post

There are no new unread posts for this topic. Daemontools /service/test/log: unable to open supervise/ok: file does not exist

debuser

0

2310

Thu Nov 26, 2009 2:11 pm

debuser View the latest post

There are no new unread posts for this topic. Linux - Unable to login (and authentication succeeds) - File size limit exceeded

debuser

3

939

Tue Dec 06, 2011 3:24 pm

admin View the latest post

There are no new unread posts for this topic. bash: Redirecting standard error to a shell variable and standard output to a file

debuser

0

168

Mon Oct 31, 2011 1:54 pm

debuser View the latest post

There are no new unread posts for this topic. bash: -bash: output: cannot overwrite existing file

debuser

0

253

Mon Oct 31, 2011 2:03 pm

debuser View the latest post

 

Who is online
Users browsing this forum: No registered users and 0 guests
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum
Jump to:  
cronNews News Site map Site map SitemapIndex SitemapIndex RSS Feed RSS Feed Channel list Channel list


Delete all board cookies | The team | All times are UTC + 2 hours [ DST ]

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
DAJ Glass 2 template created by Dustin Baccetti

phpBB SEO