#附加历史记录 shopt -s histappend
#历史记录文件的大小
HISTSIZE=50000
HISTFILESIZE=20000
#命令缩写
alias ll='ls -alF'
alias la='ls -A'
alias l='ls -CF'
alias apts='sudo apt-cache search '
alias apti='sudo apt-get install '
alias p='python3 '
alias f='pcmanfm &'
alias ra='ranger'
alias net='chromium-browser &'
alias e='vim '
alias ..='cd ..'
alias du='du –max-depth=1 -h '
#---------------------- # 进程/系统相关的函数: #---------------------- function my_ps() { ps $@ -u $USER -o pid,%cpu,%mem,bsdtime,command ; } function pp() { my_ps f | awk '!/awk/ && $0~var' var=${1:-".*"} ; } # 这个函数与linux上的'killall'基本一致 # 但是与Solaris上的却不相同 function killps() # 按进程名进行kill { local pid pname sig="-TERM" # 默认signal if [ "$#" -lt 1 ] || [ "$#" -gt 2 ]; then echo "Usage: killps [-SIGNAL] pattern" return; fi if [ $# = 2 ]; then sig=$1 ; fi for pid in $(my_ps| awk '!/awk/ && $0~pat { print $1 }' pat=${!#} ) ; do pname=$(my_ps | awk '$1~var { print $5 }' var=$pid ) if ask "Kill process $pid <$pname> with signal $sig?" then kill $sig $pid fi done }
export JAVA_HOME=/usr/lib/jvm/java-1.11.0-openjdk-amd64