~/.bashrc的配置

彩色的man和less

 15 # 2008-12-04 彩色man
 16 export LESS_TERMCAP_mb=$'\E[01;31m'
 17 export LESS_TERMCAP_md=$'\E[01;31m'
 18 export LESS_TERMCAP_me=$'\E[0m'
 19 export LESS_TERMCAP_se=$'\E[0m'
 20 export LESS_TERMCAP_so=$'\E[01;44;33m'
 21 export LESS_TERMCAP_ue=$'\E[0m'
 22 export LESS_TERMCAP_us=$'\E[01;32m'
 23
 24 # 2008-12-10 彩色less
 25 export LESS_TERMCAP_mb=$'\E[01;31m'
 26 export LESS_TERMCAP_md=$'\E[01;31m'
 27 export LESS_TERMCAP_me=$'\E[0m'
 28 export LESS_TERMCAP_se=$'\E[0m'
 29 export LESS_TERMCAP_so=$'\E[01;44;33m'
 30 export LESS_TERMCAP_ue=$'\E[0m'
 31 export LESS_TERMCAP_us=$'\E[01;32m'

Shell 内置函数

type

[root@localhost ~ 0]# type ls
ls is aliased to `ls --color=auto'
[root@localhost ~ 0]# type type
type is a shell builtin
[root@localhost ~ 0]# type bash
bash is /bin/bash

moblin 的 /etc/xdg/moblin/xinitrc 有下面代码段:

# load local modmap
test -r $HOME/.Xmodmap && xmodmap $HOME/.Xmodmap

{
if [ -d "/etc/xdg/autostart" ]; then
  for i in /etc/xdg/autostart/*.desktop; do
      grep -q -E "^Hidden=true" "$i" && continue
      if grep -q -E "^OnlyShowIn=" "$i"; then
          grep -E "^OnlyShowIn=" "$i" | grep -q 'MOBLIN;' || continue
      fi

      grep -E "^NotShowIn=" "$i" | grep -q 'GNOME;' && continue
      grep -E "^NotShowIn=" "$i" | grep -q 'MOBLIN;' && continue
      cmd_line=`grep -E "^Exec=" "$i" | cut -d'=' -f2`
      cmd=`echo "$cmd_line" | cut -d' ' -f1`
      # 下面用 type 判断命令是否存在。ionice 以指定优先级运行程序
      if test "$cmd" && type "$cmd" >/dev/null 2>&1; then
          ionice -n7  $cmd_line &
      fi
  done
fi
} &

ionice -n7 /usr/libexec/mission-control &
ionice -n7 nautilus --daemon &