alias ls='ls --color=tty -F' "linux下用--color=tty,mac下用-G来显示颜色 alias ll='ls -l' alias l='ll' alias grep='grep --color' alias egrep='egrep --color' alias rm=trash "防止勿删" trash() { if [ ! -d ~/.trash ]; then mkdir ~/.trash; fi"简单判断一下 mv $@ ~/.trash/ } cleartrash() { read -p "clear sure?" confirm [ $confirm == 'y' ] || [ $confirm == 'Y' ] && /bin/rm -rf ~/.trash/* }