Mailing List Archive

Support open source code!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: tlug: ls colorful




marcospbc@example.com said:
> How can I make turn that options in default? I tried to edit the /etc/
> bashrc  inserting the line "ls="ls --color"" but it didn't work... Do
> I need to  recompile ls command? 

It's ~/.bashrc (or /etc/profile for system wide settings.)

I also found that /etc/bashrc exists on my box. Though I don't know 
reason why. According to man [*] bash doesn't source /etc/bashrc file. 
It didn't work also in my case. So I put in my ~/.bashrc:

if [ -f /etc/bashrc ]; then
	. /etc/bashrc
fi

and line is:

$ grep ls .bashrc
alias ls="ls --color=yes"


Cheers

Dmytro

[*]
man bash:

       When  bash  is  invoked as an interactive login shell, or as a 
non-
       interactive shell with the --login option, it first reads and  
exe-
       cutes  commands  from  the  file /etc/profile, if that file 
exists.
       After  reading   that   file,   it   looks   for   
~/.bash_profile,
       ~/.bash_login,  and  ~/.profile,  in that order, and reads and 
exe-
       cutes commands from the first one that exists and is readable.  
The
       --noprofile option may be used when the shell is started to 
inhibit
       this behavior.

       When a login shell exits, bash reads and executes commands from 
the
       file ~/.bash_logout, if it exists.

       When  an  interactive  shell  that is not a login shell is 
started,
       bash reads and executes  commands  from  ~/.bashrc,  if  that  
file
       exists.   This  may  be  inhibited by using the --norc option.  
The
       --rcfile file option will force bash to read and  execute  
commands
       from file instead of ~/.bashrc.


-- 
Dmytro

       _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/
      _/                                                 _/
     _/  Dmytro Koval'ov, mailto:kov@example.com  _/
    _/  UNIX Systems Administration                    _/
   _/  http://www.asahi-net.or.jp/~as9d-kvlv          _/
  _/                                                 _/
 _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/

      Familiarity breeds attempt.


--------------------------------------------------------------------
Next Nomikai Meeting: February 18 (Fri) 19:00 Tengu TokyoEkiMae
Next Technical Meeting:  March 11 (Sat) 13:00 Temple University Japan
* Topic: TBD
--------------------------------------------------------------------
more info: http://www.tlug.gr.jp        Sponsor: Global Online Japan


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links