LINUX LITE 7.4 FINAL RELEASED - SEE RELEASE ANNOUNCEMENTS SECTION FOR DETAILS


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ls: unrecognized/unknown option «--color [»
#3
(11-06-2017, 09:02 PM)Moltke link Wrote: I wanted to list files/folders in a directory with
Code:
ls
and got this 
Code:
ls: unrecognized option «--color [»
Why am I seeing this?

Often there are predefined aliases. For Example in my system there are for example those aliases:

Code:
alias cd..='cd ..'
alias c~='cd ~'
alias la='ls -a | grep '\''^\.'\'' | column'
alias ls='ls --color'

In many cases those aliases are defined in the file "[tt]home/USERNAME/.bashrc[/tt]" or in "[tt]/home/USERNAME/.bash_aliases[/tt]". (Of course you have to replace "USERNAME" by your account name.)

In my opinion there might be a typo in the definition of the alias for "ls". You might test it by typing:

Code:
alias ls='ls --color:always'
ls

If now you get no error message as before, it should be a typo in the alias definition.

But to make this change permanent you have to edit the file ".bashrc" (or ".bash_aliases"), in which the alias is wrong defined.

HTH
"Show up on time, know your lines, and don't bump into the furniture."
Reply


Messages In This Thread
Re: ls: unrecognized/unknown option «--color [» - by JohnD - 11-06-2017, 09:29 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)