Linux, FreeBSD, Juniper, Cisco / Network security articles and troubleshooting guides

FAQ
It is currently Tue Jun 06, 2023 7:37 am


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

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

Joined: Thu Aug 06, 2009 2:48 am
Posts: 105

Offline
 

Normalizing terminal prompt (or putty prompt) after catting a binary file

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: Wed Aug 04, 2010 5:39 pm

Joined: Thu Aug 06, 2009 2:48 am
Posts: 105

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
jonnblaze
Post  Post subject: Re: Normalizing terminal prompt (or putty prompt) after catting a binary file  |  Posted: Mon Jul 29, 2013 1:02 am

Joined: Mon Jul 29, 2013 12:58 am
Posts: 1

Offline
thank you very much for sharing this. its very helpful

_________________
gHost rIdEr


Top
Display posts from previous:  Sort by  
E-mail friendPrint 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

1714

Thu Mar 03, 2011 5:58 am

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

5153

Thu Nov 26, 2009 7:11 am

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

3226

Tue Dec 06, 2011 8:24 am

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

4970

Mon Oct 31, 2011 6:54 am

debuser View the latest post

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

debuser

0

4816

Mon Oct 31, 2011 7:03 am

debuser View the latest post

 

Who is online
Users browsing this forum: No registered users and 0 guests
You can post new topics in this forum
You can 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:  
News 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 - 5 hours [ DST ]



phpBB SEO