Unix Technical Forum

weird characters

This is a discussion on weird characters within the Slackware Linux Support forums, part of the Unix Operating Systems category; --> hi everyone- sometimes in my curiosity to learn linux, i start "cat"ing random files in the log directory and ...


Go Back   Unix Technical Forum > Unix Operating Systems > Slackware Linux Support

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-19-2008, 07:55 AM
Dave
 
Posts: n/a
Default weird characters

hi everyone-

sometimes in my curiosity to learn linux, i start "cat"ing random files in
the log directory and such, thinking they are actual logs... i do this with
scripts and the such too. However, sometimes i neglect to realize it is a
binary file i am "cat"ing, and after it is done, my prompt is all garbage
characters. I tried logging out and killing the agetty that spawns that
console, but it just respawns, still with garbage instead of letters. Is
there any way to fix this short of a reboot?

thanks
--
dave
766-- The Irritating Upstairs Neighbor of the Beast
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-19-2008, 07:55 AM
Menno Duursma
 
Posts: n/a
Default Re: weird characters

On Thu, 29 Jan 2004 21:38:34 -0500, Dave wrote:

> hi everyone-
>
> sometimes in my curiosity to learn linux, i start "cat"ing random files in
> the log directory and such, thinking they are actual logs... i do this with
> scripts and the such too. However, sometimes i neglect to realize it is a
> binary file i am "cat"ing, and after it is done, my prompt is all garbage
> characters. I tried logging out and killing the agetty that spawns that
> console, but it just respawns, still with garbage instead of letters. Is
> there any way to fix this short of a reboot?


How about trying (ta da):

reset

(If that fails though try: "setterm -reset").

--
-Menno.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-19-2008, 07:55 AM
Dave
 
Posts: n/a
Default Re: weird characters

Menno Duursma wrote:

> How about trying (ta da):
>
> reset


ah! thanks!
--
dave
766-- The Irritating Upstairs Neighbor of the Beast
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 02-19-2008, 07:55 AM
Julien Mills
 
Posts: n/a
Default Re: weird characters

Dave wrote:
> Menno Duursma wrote:


>>How about trying (ta da):
>>
>> reset

>
>
> ah! thanks!



and try the command:
#file filename
which will tell you if it's a binary
file, before you display it to the
console.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 02-19-2008, 07:55 AM
Steve Youngs
 
Posts: n/a
Default Re: weird characters

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)
Comment: Eicq - The XEmacs ICQ Client <http://eicq.sf.net/>

iEUEABECAAYFAkAZ0bsACgkQHSfbS6lLMAPpIACVHHMATc+9d5 M2xPKvYG9bPZ5N
uQCgko4UZ/uqcTt5LLWIa0sYo2NcxEM=
=X3Z4
-----END PGP SIGNATURE-----
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 02-19-2008, 07:56 AM
Joost Kremers
 
Posts: n/a
Default Re: weird characters

Dave wrote:
> sometimes in my curiosity to learn linux, i start "cat"ing random files in
> the log directory and such, thinking they are actual logs... i do this with
> scripts and the such too. However, sometimes i neglect to realize it is a
> binary file i am "cat"ing, and after it is done, my prompt is all garbage
> characters.


others have told you how to get out of it, but let me give you a tip:
instead of using cat, use less. it not only handles binary files better,
without messing up the console, it also allows you to navigate through the
file.

--
Joost Kremers joostkremers@yahoo.com
Slackware doesn't have any quirks. Other distros have quirks. Slackware's
just pure Linux.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 02-19-2008, 07:56 AM
quillion
 
Posts: n/a
Default Re: weird characters

Joost Kremers wrote:
> Dave wrote:
>
>>sometimes in my curiosity to learn linux, i start "cat"ing random files in
>>the log directory and such, thinking they are actual logs... i do this with
>>scripts and the such too. However, sometimes i neglect to realize it is a
>>binary file i am "cat"ing, and after it is done, my prompt is all garbage
>>characters.

>
>
> others have told you how to get out of it, but let me give you a tip:
> instead of using cat, use less. it not only handles binary files better,
> without messing up the console, it also allows you to navigate through the
> file.
>

or the rather nice 'most' from http://www.jedsoft.org/

--
zsine
http://www.quillion.ukfsn.org
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 02-19-2008, 07:56 AM
Dave
 
Posts: n/a
Default Re: weird characters

Joost Kremers<joostkremers@yahoo.com> wrote on Friday 30 January 2004 6:58
am:
> others have told you how to get out of it, but let me give you a tip:
> instead of using cat, use less. it not only handles binary files better,
> without messing up the console, it also allows you to navigate through the
> file.
>

thanks!
thatll sure make things easier
--
dave
766-- The Irritating Upstairs Neighbor of the Beast
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 02-19-2008, 08:02 AM
Nikolay Zhuravlev
 
Posts: n/a
Default Re: weird characters

In <bvcg3f$qkeip$1@ID-146796.news.uni-berlin.de>, Dave wrote:
[skip]

> binary file i am "cat"ing, and after it is done, my prompt is all garbage
> characters. I tried logging out and killing the agetty that spawns that
> console, but it just respawns, still with garbage instead of letters. Is
> there any way to fix this short of a reboot?
>
> thanks


Yet another way: Ctrl-V-O

--
WBR, Nikolay Zhuravlev
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10 (permalink)  
Old 02-19-2008, 08:02 AM
Avera
 
Posts: n/a
Default Re: weird characters

Nikolay Zhuravlev wrote:

> In <bvcg3f$qkeip$1@ID-146796.news.uni-berlin.de>, Dave wrote:
> [skip]
>
>> binary file i am "cat"ing, and after it is done, my prompt is all garbage
>> characters. I tried logging out and killing the agetty that spawns that
>> console, but it just respawns, still with garbage instead of letters. Is
>> there any way to fix this short of a reboot?
>>
>> thanks

>
> Yet another way: Ctrl-V-O
>

#
Try also typing blindly the command "reset" and enter.
Avera.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 07:17 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com