Strange output by the "ls -l|less" command pipe in FC5

Mike McCarty Mike.McCarty at sbcglobal.net
Fri Apr 7 05:28:05 UTC 2006


Joachim Backes [RHRK] wrote:
> Using "ls -l|less " in FC5 gives a strange output on a fresh FC5 
> installation.
> Using "more" instead of "less" generates correct output. Did anybody 
> make similar experiences?
> 
> ESC[00mtotal 916
> -rw-r--r-- 1 root root 11942 Feb 12 09:50 ESC[00mLICENSEESC[00m

What you see here is the escape sequences for setting colors
coming out of ls. You see, "less" is translating the escape
sequences into graphic characters (like 0x1B is becoming "ESC").

Try this...

$ ls -l --color=never | less

If that looks ok (it should) try

$ ls -l --color=auto | less

That *should* also work. You may have an alias for "ls".

Mike
-- 
p="p=%c%s%c;main(){printf(p,34,p,34);}";main(){printf(p,34,p,34);}
This message made from 100% recycled bits.
You have found the bank of Larn.
I can explain it for you, but I can't understand it for you.
I speak only for myself, and I am unanimous in that!




More information about the fedora-list mailing list