On Tue, 26 Oct 1999, Herman Aa wrote:

> 
> How do I make a listing of all files in a directory (on my CDROM)?
> 
> I tried:    ls > filnam   
>  but it does not give a clean list:
> 
> sag-0.5-1.noarch.rpm

Quick answer:
ls -a --color=no >filnam

Longer answer:
These are color codes - your ls is trying to give colored listings.
Somewhere you will have ls aliases to ls color=yes (probably in
/etc/bashrc, but maybe somewhere else).  If you change this to read:
alias ls="ls --color=tty" it should give you colorful listings only on
ttys, giving you a clean listing in a file.  Once you've changed this, you
should then be able to do ls -a >filnam and get a clean listing.

HTH

-- 
Mike <[EMAIL PROTECTED]>

God help those who do not help themselves.
                -- Wilson Mizner

Reply via email to