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

Tim ignored_mailbox at yahoo.com.au
Fri Apr 7 16:35:45 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

I'm sure I've tried that on FC5 and not seen the effect you mention.  It
certainly doesn't with FC4.

Mike McCarty:
> 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

Interestingly, FC4 seems to handle this well, and it's using this alias:
alias ls='ls --color=tty'.  So it looks like "less" behaves differently
between FC4 and FC5, rather than "ls".  There are options for how less
handles ANSI in the text, perhaps the defaults have changed.

-- 
(Currently running FC4, occasionally trying FC5.)

Don't send private replies to my address, the mailbox is ignored.
I read messages from the public lists.




More information about the fedora-list mailing list