Ls_colors

Hi,

I have a .profile document BASH previously when I use FreeBSD 6.4 "ls" any extension of the file when I was making color the way I want.

I'm using FreeBSD 8.0 as my computer now, "ls" does not work when I already set the colors how I can fix

Code:
# /etc/profile: This file contains system-wide defaults used by
# all Bourne (and related) shells.

# Set the values for some environment variables:
export MINICOM="-c on"
export MANPATH=/usr/local/man:/usr/man:/usr/X11R6/man
export HOSTNAME="`cat /etc/HOSTNAME`"
export LESSOPEN="|lesspipe.sh %s"
export LESS="-M"

# If the user doesn't have a .inputrc, use the one in /etc.
if [ ! -r "$HOME/.inputrc" ]; then
  export INPUTRC=/etc/inputrc
fi

# Set the default system $PATH:
PATH="/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/usr/games"

# For root users, ensure that /usr/local/sbin, /usr/sbin, and /sbin are in
# the $PATH.  Some means of connection don't add these by default (sshd comes
# to mind).
if [ "`id -u`" = "0" ]; then
  echo $PATH | grep /usr/local/sbin 1> /dev/null 2> /dev/null
  if [ ! $? = 0 ]; then
    PATH=/usr/local/sbin:/usr/sbin:/sbin:$PATH
  fi
fi

# I had problems using 'eval tset' instead of 'TERM=', but you might want to 
# try it anyway. I think with the right /etc/termcap it would work great.
# eval `tset -sQ "$TERM"`
if [ "$TERM" = "" -o "$TERM" = "unknown" ]; then
 TERM=linux
fi

# Set ksh93 visual editing mode:
if [ "$SHELL" = "/bin/ksh" ]; then
  VISUAL=emacs
#  VISUAL=gmacs
#  VISUAL=vi
fi

# Set a default shell prompt:
#PS1='`hostname`:`pwd`# '
if [ "$SHELL" = "/bin/pdksh" ]; then
 PS1='! $ '
elif [ "$SHELL" = "/bin/ksh" ]; then
 PS1='! ${PWD/#$HOME/~}$ '
elif [ "$SHELL" = "/bin/zsh" ]; then
 PS1='%n@%m:%~%# '
elif [ "$SHELL" = "/bin/ash" ]; then
 PS1='$ '
else
 PS1='\u@\h:\w\$ '
fi
PS2='> '
export PATH DISPLAY LESS TERM PS1 PS2

# Default umask.  A umask of 022 prevents new files from being created group
# and world writable.
umask 022

# Set up the LS_COLORS and LS_OPTIONS environment variables for color ls:
if [ $SHELL = /usr/local/bin/bash ]; then
        export PS1='\u@\h \033[31m[\033[0m\W\033[31m]\033[0m\033[32m$\033[0m '
        alias ls="ls -G"
        LSCOLORS="ExGxFxdxCxDxDxhbadExEx"
#        LSCOLORS="gxfxcxdxbxegedadabagacad"
        export LSCOLORS
        if [ "$TERM" = "xterm" ]; then
                TERM="xterm-color"
                export TERM
        fi
fi
alias ll='ls -al'
alias archive='tar -cfz ARCHIVE.tar.gz'
export INPUTRC=/etc/inputrc
#echo "........"
#/usr/bin/uptime
#echo "........"

# Notify user of incoming mail.  This can be overridden in the user's
# local startup file (~/.bash.login or whatever, depending on the shell)
if [ -x /usr/bin/biff ]; then
 biff y
fi

# Append any additional sh scripts found in /etc/profile.d/:
for profile_script in /etc/profile.d/*.sh ; do
  if [ -x $profile_script ]; then
    . $profile_script
  fi
done
unset profile_script

# For non-root users, add the current directory to the search path:
if [ ! "`id -u`" = "0" ]; then
 PATH="$PATH:."
fi

PATH="$PATH:/usr/lib:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/usr/X11R6/bin:/bin:/etc:"
#LS_COLORS="di=34;1:*.c=33;1:*.mpeg=34;2:*.conf=35;1:*.tgz=31;2:*.tar=31;1:*.jpg=35;2:*.gif=35;2:*.log=36;2:*.mp3=33;2:*.png=35;2:*.gz=1;
31:*core=1;40;5:*.db=33;01:*.pid=44;4:*.h=37;01:*.old=07;7:*.OLD=07;7:*.rpm=1;31:*.o=33;6:*-=33;2:*.bak=3;36:*.bz2=1;31:*.tcl=30;42"
PS1="\[\033[34;01;2m\](\[\033[32;01m\]\u\[\033[33;01m\]@\[\033[32;01m\]\h\
\[\033[34;01;2m\])\[\033[34;01;2m\]-\[\033[34;01;2m\](\[\033[32;01m\]\$(date +%I:%M%P)\[\033[00m\]\
\[\033[34;01;2m\])-(\[\033[32;01m\]\$(date +%m)/\$(date +%d)\
\[\033[34;01;2m\])-(\[\033[34;01m\]\[\033[33;01m\]\l\[\033[0m\]\
\[\033[34;01;2m\])\n\[\033[34;01m\]\[\e[34;01;2m\](\[\e[31;01m\]\w\[\e[34;01;2m\])>\[\e[m\] "
PS2="> "

#### Motd color
BLACK='\e[0;30m'
BLUE='\e[0;34m'
GREEN='\e[0;32m'
CYAN='\e[0;36m'
RED='\e[0;31m'
PURPLE='\e[0;35m'
BROWN='\e[0;33m'
LIGHTGRAY='\e[0;37m'
DARKGRAY='\e[1;30m'
LIGHTBLUE='\e[1;34m'
LIGHTGREEN='\e[1;32m'
LIGHTCYAN='\e[1;36m'
LIGHTRED='\e[1;31m'
LIGHTPURPLE='\e[1;35m'
YELLOW='\e[1;33m'
WHITE='\e[1;37m'
NC='\e[0m'  
BOLD='\e[1m'
echo -e "${RED}- =========${WHITE}######${RED}=================="
echo -e "${RED}- ========${WHITE}##########${RED}================"
echo -e "${RED}- ======${WHITE}#############${RED}================"
echo -e "${RED}- =====${WHITE}##############${RED}================"
echo -e "${RED}- ====${WHITE}#######${RED}=======${WHITE}###${RED}============="
echo -e "${RED}- ====${WHITE}######${RED}=========${WHITE}##${RED}===${WHITE}##${RED}======="
echo -e "${RED}- ====${WHITE}######${RED}==============${WHITE}###${RED}====="
echo -e "${RED}- ====${WHITE}#####${RED}==============${WHITE}######${RED}==="
echo -e "${RED}- ====${WHITE}#####${RED}=============${WHITE}#######${RED}====              ${WHITE}root ${YELLOW}: ${LIGHTBLUE}DaRkOfNiGHts ${DARKGRAY}& ${LIGHTBLUE}eco"
echo -e "${RED}- ====${WHITE}#####${RED}============${WHITE}#######${RED}======             ${WHITE}mail ${YELLOW}: ${LIGHTBLUE}DarK${DARKGRAY}@${LIGHTBLUE}DaRkOfNiGHts.Net"
echo -e "${RED}- ====${WHITE}#####${RED}==============${WHITE}######${RED}======="
echo -e "${RED}- ====${WHITE}#####${RED}===============${WHITE}######${RED}======"
echo -e "${RED}- ====${WHITE}######${RED}==============${WHITE}###${RED}==${WHITE}##${RED}====="
echo -e "${RED}- =====${WHITE}######${RED}========${WHITE}#${RED}====${WHITE}##${RED}========="
echo -e "${RED}- ======${WHITE}#######${RED}====${WHITE}###${RED}=============="
echo -e "${RED}- ========${WHITE}############${RED}==============="
echo -e "${RED}- =========${WHITE}##########${RED}=================="
echo -e "${RED}- ===========${WHITE}######${RED}====================="


echo -e "       ${WHITE}Hizli Kurulum ${RED}:"

echo -e "                   \033[1m${YELLOW}getegg  ${LIGHTBLUE}- ${WHITE}(hesabiniza eggdrop kurar)"
echo -e "                   \033[1m${YELLOW}geteggv6  ${LIGHTBLUE}- ${WHITE}(hesabiniza eggdrop+ipv6 kurar)"
echo -e "                   \033[1m${YELLOW}geteggssl  ${LIGHTBLUE}- ${WHITE}(hesabiniza eggdrop+ssl kurar)"
echo -e "                   \033[1m${YELLOW}getpsy  ${LIGHTBLUE}- ${WHITE}(hesabiniza psybnc kurar)"
echo -e "                   \033[1m${YELLOW}getsbnc  ${LIGHTBLUE}- ${WHITE}(hesabiniza sbnc kurar)"
echo -e "                   \033[1m${YELLOW}vhosts  ${LIGHTBLUE}- ${WHITE}(Vhost Listesini Gosterir)"

echo -e '\033[34;01m'
uptime
uname -a
echo -e '\033[0m'

set color
export LS_COLORS="di=34;1:*.c=33;1:*.mpeg=34;2:*.txt=36;2:*.chan=0;31:*.user=35;1:*.conf=33;1:*.tgz=31;2:*.tar=31;1:*.jpg=35;2:*.gif=35;
2:*.log=36;2:*.mp3=33;2:*.png=35;2:*.gz=1;31:*core=1;40;5:*.db=33;03:*.pid=44;4:*.h=38;01:*.old=07;7:*.OLD=07;7:*.rpm=1;31:*.o=33;6:*-=33;
2:*.bak=3;36:*.bz2=1;31:*.tcl=37;01"




#eval `$LS_COLORS`
#eval `dircolors -b`
alias ls='ls --color=always'
 
Use [cmd=]ls -G[/cmd] for one-time colourization, or put [cmd=]export CLICOLOR=yes[/cmd] into your ~/.bashrc.
 
I give the following set but I still do not work it gives error

Code:
(~)> bash
: command not found
'ash: /home/DarK/.bashrc: line 10: syntax error near unexpected token `{
'ash: /home/DarK/.bashrc: line 10: `getegg() {
(DarK@FreeBSD)-(02:53P)-(02/06)-(2)
ls)>
ls: illegal option --
usage: ls [-ABCFGHILPRSTUWZabcdfghiklmnopqrstuwx1] [-D format] [file ...]

Code:
alias ls="ls -G"
export LSCOLORS="ExGxFxdxCxDxDxhbadExEx"
export CLICOLOR=yes
export TERM=xterm
export PS1="\[\033[34;01;2m\](\[\033[32;01m\]\u\[\033[33;01m\]@\[\033[32;01m\]\h\\[\033[34;01;2m\])\[\033[34;01;2m\]-\[\033[34;01;2m\]
(\[\033[32;01m\]\$(date +%I:%M%P)\[\033[00m\]\\[\033[34;01;2m\])-(\[\033[32;01m\]\$(date +%m)/\$(date +%d)\\[\033[34;01;2m\])-(\[\033[34;01m
\]\[\033[33;01m\]\l\[\033[0m\]\\[\033[34;01;2m\])\n\[\033[34;01m\]\[\e[34;01;2m\](\[\e[31;01m\]\w\[\e[34;01;2m\])>\[\e[m\] "
export PS2="> "
export LS_COLORS="di=34;1:*.c=33;1:*.mpeg=34;2:*.txt=36;2:*.chan=0;31:*.user=35;1:*.conf=33;1:*.tgz=31;2:*.tar=31;1:*.jpg=35;2:*.gif=35;
2:*.log=36;2:*.mp3=33;2:*.png=35;2:*.gz=1;31:*core=1;40;5:*.db=33;03:*.pid=44;4:*.h=38;01:*.old=07;7:*.OLD=07;7:*.rpm=1;31:*.o=33;6:*-=33;
2:*.bak=3;36:*.bz2=1;31:*.tcl=37;01"
export PS1="\[\033[34;01;2m\](\[\033[32;01m\]\u\[\033[33;01m\]@\[\033[32;01m\]\h\
\[\033[34;01;2m\])\[\033[34;01;2m\]-\[\033[34;01;2m\](\[\033[32;01m\]\$(date +%I:%M%P)\[\033[00m\]\
\[\033[34;01;2m\])-(\[\033[32;01m\]\$(date +%m)/\$(date +%d)\
\[\033[34;01;2m\])-(\[\033[34;01m\]\[\033[33;01m\]\l\[\033[0m\]\
\[\033[34;01;2m\])\n\[\033[34;01m\]\[\e[34;01;2m\](\[\e[31;01m\]\w\[\e[34;01;2m\])>\[\e[m\] "
export PS2="> "
 
Back
Top