.... အားလံုးအတြက္ မဟုတ္ခဲ့ရင္ေတာင္ တစ္စံုတစ္ရာ တစ္စံုတစ္ေယာက္အတြက္ ေႏြးေထြးတဲ့ ေကာင္းကင္ငယ္ေလး ျဖစ္ပါရေစ ....

Wednesday, September 5, 2012

Change To Default Color in BashShelL

ဒါကေတာ့ ကြ်န္ေတာ္တို့ လင္းနစ္မွာပါလာတဲ့ သူ့မူရင္း default ကာလာကိုေျပာင္းျပီးျကည့္ဖိုအတြက္ပါ ထားပါေတာ့ နမူနာအေနနဲ လင္းနစ္မွာ rwx (script,exe lib) ပါမစ္ဖိုင္ေတြဆို အစိမ္းေရာင္ နဲ့အနီေ၇ာင္.  Directory ဆိုရင္ အျပာေရာင္, text,normal ဆိုရင္ အျဖူေရာင္ . အစရွိသည္ေပါ့ဗ်ာ. အဲ တစ္ခ်ိဳ႔ေတြမွာ ျဖစ္ပါတယ္ .. မူရင္းကိုက အျဖူေရာင္ကာလာ တစ္ခုပဲပါလာတာပါ ..ဘယ္လိုဖိုင္အမ်ိုးစားပဲျဖစ္ေနပါေစ . ls ေခါက္ျကည့္ရင္  အျဖူပဲေပၚေနမွာပါ ဒါဆို ဘယ္ဖိုင္ဘာဆိုတာကို အလြယ္တစ္ကူ မခြဲနိုင္ျဖစ္ေန တတ္ပါတယ္.. ဒါေၾကာင့္ အခုလိုေျပာင္းေပးလုိက္ရင္ လင္းနစ္ရဲ႕ ကာလာေလးေတြ ျပန္ေပၚလာပါလိမ့္မယ္ 

ပထမအဆင့္အေနနဲ႔ ေအာက္ကအတိုင္း ၀င္ျပီးျပင္ပါ့မယ္ 

root@SvP:/# dircolors -p > ~/.dircolorsrc 

ေနာက္ျပီး /root ေအာက္ကို၀င္ျပင္မယ္ ဒီလိုေလးေပးလိုက္မယ္

root@SvP:/# vi /root/.dircolorsrc 

#NORMAL 00 # no color code at all
#FILE 00 # regular file: use no color at all
RESET 0 # reset to "normal" color
DIR 01;34 # directory  ---> change no:
LINK 01;36 # symbolic link. (If you set this to 'target' instead of a
 # numerical value, the color is as for the file pointed to.)
MULTIHARDLINK 00 # regular file with more than one link

ေနာက္တစ္ဆင့္အေနနဲ့ /root/.bashrc ဒီကို၀င္ျပင္မယ္ .. ဒါကေတာ့ ခုနကျပင္ထားတဲ့ကာလာကိုဖတ္ဖို့ပါ

root@SvP:/# vi /root/.bashrc 

# ~/.bashrc: executed by bash(1) for non-login shells.

# You may uncomment the following lines if you want `ls' to be colorized:
export LS_OPTIONS='--color=auto' ကြန္မန့္ေတြျဖုတ္လိုက္ပါတယ္
eval "`dircolors -b ~/.dircolors`" ကြန္မန့္ေတြျဖုတ္လိုက္ပါတယ္
alias ls='ls $LS_OPTIONS' ကြန္မန့္ေတြျဖုတ္လိုက္ပါတယ္
alias ll='ls $LS_OPTIONS -l' ကြန္မန့္ေတြျဖုတ္လိုက္ပါတယ္
alias l='ls $LS_OPTIONS -lA' ကြန္မန့္ေတြျဖုတ္လိုက္ပါတယ္
#
# Some more alias to avoid making mistakes:
# alias rm='rm -i'
# alias cp='cp -i'
# alias mv='mv -i'

ျပီးရင္ေတာ့ တာမင္နယ္ကိုပိတ္ျပီးျပန္ဖြင့္ ls ေခါက္ျကည့္တာနဲ ခုနကနဲမတူတဲ့ လင္းနစ္ကာလာေလးေတြကိုျမင္ရမွာပါ.