old:bash:bashrc
.bashrc
PS1="\[\033[0;35m\]\u@\h:\w\n\\$ \[\033[0m\]"
# don't put duplicate lines in the history. See bash(1) for more options
export HISTCONTROL=ignoredups
# save 16384 comands
export HISTSIZE=16384
# save 16384 * 80 bytes
export HISTFILESIZE=1310720
# check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.
shopt -s checkwinsize
# merge and append history from all terminals
shopt -s histappend
case $TERM in
xterm*|dtterm|vt100)
PROMPT_COMMAND='history -a ; echo -ne "\033]0;${USER}@${HOSTNAME%%.*}:${PWD}\007"'
;;
*)
:
;;
esac
# some alias definitions
alias ..='cd ..'
alias c='clear'
alias dir='ls -liaF'
alias dot='ls .[a-zA-Z0-9_]*'
alias gri='grep -i'
alias j='jobs'
alias l='ls -liF'
alias ll='ls -laF'
alias lal="ls -al | $PAGER"
alias pings='ping -s'
alias h='history'
export PS1
# source system specific configurations
[ -f ~/.bashrc_user ] && . ~/.bashrc_user
stty erase
stty -echoctl
# set PAGER
if [ -x /usr/bin/less -o -x /usr/local/bin/less ]
then
PAGER="less -E"
else
PAGER=/usr/more
fi
export PAGER
# some useful functions
psu ()
{
if [ -n "$2" ]; then
/bin/ps auxwww | grep -e $1 -e $2
elif [ -n "$1" ]; then
/bin/ps auxwww | grep $1
else
/bin/ps auxwww
fi
}
psl ()
{
if [ -n "$2" ]; then
/bin/ps auxw | grep -e $1 -e $2 | less
elif [ -n "$1" ]; then
/bin/ps auxw | grep $1 | $PAGER
else
/bin/ps auxw | $PAGER
fi
}
old/bash/bashrc.txt · Last modified: 2023/01/11 20:29 by 127.0.0.1