Results 1 to 8 of 8
hey there
I noticed a funny thing happening with cat cmd. When on prompt (root) i typed cat * and executed it . My monitor was bombarded with alien character ...
- 04-03-2009 #1
Funny thing with 'cat' cmd
hey there
I noticed a funny thing happening with cat cmd. When on prompt (root) i typed cat * and executed it . My monitor was bombarded with alien character and it kept on runnning for sometime , after breaking out of it my promt became unreadable
does anyone know y is it happenig.....
- 04-03-2009 #2Linux Enthusiast
- Join Date
- Aug 2006
- Location
- Portsmouth, UK
- Posts
- 539
depends where you ran it. But sounds like your cat command included binary files....
That can often screw up your session.RHCE #100-015-395
Please don't PM me with questions as no reply may offend, that's what the forums are for.
- 04-03-2009 #3
?????
hey thanks for replying bro. I'm writing this here cause you don't want any PM. Although I got you point but do you have any idea why is it happening like that?
- 04-03-2009 #4Linux Enthusiast
- Join Date
- Aug 2006
- Location
- Portsmouth, UK
- Posts
- 539
Well binary files are full of non printing control characters, some sequences get interpreted and screw up your session.
Why would you want to "cat" everything anyway? If your looking for something use grep...RHCE #100-015-395
Please don't PM me with questions as no reply may offend, that's what the forums are for.
- 04-03-2009 #5Linux Guru
- Join Date
- Nov 2007
- Location
- Córdoba (Spain)
- Posts
- 1,513
"cat *" means "cat everything in the current directory", which will show the contents of all the files in the current dir (that's what * stands for).
Between all the files probably there were some binary (i.e. files that do not contain plain text). These files contains characters that can screw up your display since they are not interpreted as text as matonb said.
- 04-03-2009 #6Linux Guru
- Join Date
- Nov 2004
- Posts
- 6,110
When you cat a binary file and mess up your terminal, you can run the command reset to fix your terminal for you.
Last edited by bigtomrodney; 04-03-2009 at 11:05 AM.
- 04-03-2009 #7Linux Enthusiast
- Join Date
- Aug 2006
- Location
- Portsmouth, UK
- Posts
- 539
Well pointed out bigtom, ye ol' reset has has come in handy a few times
RHCE #100-015-395
Please don't PM me with questions as no reply may offend, that's what the forums are for.
- 04-03-2009 #8
problem solved
Cheers guys thanks for helping me out


Reply With Quote