cat <<EOF>>/etc/bashrc
### by author:albert-dong
alias grep='grep --color=auto'
alias ls='ls -hF --color=auto'
alias la='ls -ahF --color=auto'
alias dir='ls --color=auto --format=long'
alias ll='ls -l --color=auto'
alias p100='ping -c 100 -i 0.01'
alias tarl='f(){ tar -tvf \$1;};f'
alias size='f(){ du -sh \$1* | sort -hr; }; f'
alias cd='f(){ cd \$1;ls -lrtkh;};f'
alias nets='netstat -ntlp'
### 历史记录
HISTSIZE=
HISTFILESIZE=
USER_IP=\`who -u am i 2>/dev/null| awk '{print \$NF}'|sed -e 's/[()]//g'\`
export HISTTIMEFORMAT="%F %T [\${USER_IP}] \`whoami\`: "
alias cman='man -M /usr/share/man/zh_CN'
alias ll='ls -l --color=auto'
export PS1='\[\033[1;33;1m\][\[\033[0;32;1m\]\u@\h \[\033[1;33;1m\]\W\[\033[1;33;1m\]]\[\033[1;33;1m\]\\$\[\033[0m\]'
#export PS1="[\\u@\\h \\W \\A]\\$ "
export HISTCONTROL=ignorespace:erasedups:ignoredups
HISTIGNORE="&:[ ]*:exit:chattr:ls:bg:fg:history:clear:vim:chattr:vi:mysql:useradd:chpasswd"
#eval "\$(thefuck --alias)"
EOF
下一篇:Dockerfile-ban