Sunday, September 9, 2007

removing garbage characters from screen terminal

You were playing with linux commands and special files, then suddenly all screen characters from current ssh session becomes unreadable. Unreadable in such a way that all string screen characters becomes non-printable characters or in short becomes garbage or garbles characters.

Here's a simple tip on how to remove non-printable and garbage characters from your screen and reset all characters to normal view without disconnecting your current ssh session.

This tip is quite handy and useful when you are encounter these scenario from playing with special linux files.

An example of garbage or non-printable characters are shown below.


And here is how to reset and clear them from your screen, simply issue

# reset

Reset linux command initialize your current terminal session including character mapping and control character from your screen terminal.

How to achieve a garbage or garbled screen character? Simply do as follows

# cat /dev/urandom

Hit Ctrl+C, and executing the above command shows a continuous garbled characters being scrolled up from your screen.

Another way to reproduce a garbled and scrambled set of screen characters is to issue

# cat /etc/localtime

To reset your terminal screen characters, use this reset command. Reset linux command clears those garbage away.

0 comments:

Sign up for PayPal and start accepting credit card payments instantly.
ILoveTux - howtos and news | About | Contact | TOS | Policy