# .bashrc - master version # Default bit-mask umask 022 # group read if [ `/usr/bin/whoami` = 'root' ] then umask 077 # strict bastard for # fi # root shell and path if [ `/usr/bin/whoami` = 'root' ]; then if [ "$SHELL" = '/bin/bash' ] || [ "$SHELL" = '/bin/sh' ]; then export PS1='\[\033[01;31m\]\h \[\033[01;34m\]\W \$ \[\033[00m\]' fi # export PATH="/bin:/sbin:/usr/bin:/usr/sbin:${ROOTPATH}" else if [ "$SHELL" = '/bin/bash' ] || [ "$SHELL" = '/bin/sh' ]; then export PS1='\[\033[01;32m\]\u@\h \[\033[01;34m\]\W \$ \[\033[00m\]' fi # export PATH="/bin:/usr/bin:${PATH}" fi # Dynamic titlebar export PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD}\007"' ### Variables ### export m='/stuff/Media/Music' # etc... ### Aliases ### # Color support ls if [ "$TERM" != 'dumb' ]; then # eval `dircolors -b` # alias ls='ls --color=auto' alias ls='ls -a --color=auto' alias ll='ls -l' alias l.='ls -d .[a-zA-Z]' alias dir='ls --format=vertical' alias vdir='ls --format=long' fi # Config files alias rc='source ~/.bashrc' alias virc='vi ~/.bashrc; rc' alias vivi='vi ~/.vimrc' alias vipr='vi ~/.procmailrc' # Editing alias vito='vi ~/TODO.otl' alias visw='vi ~/software.log' # Navigation alias cdd='pushd' alias cdrf='cdd ~/www/randomfoo.net/' alias cdtw='cdd ~/www/twine/' alias cdnext='cdd /home/lhl/www/next.randomfoo.net/htdocs' alias cdll='cdd ~/www/leonardlin.com/' alias cdnext='cdd ~/www/next.randomfoo.net/htdocs/' alias cdjk='cdd ~/www/randomfoo.net/junk/current' alias cdvha='cdd ~/www/leonardlin.com/extranet/vha/ct/int' alias cdbt='cdd ~lhl/bt' alias cdmu='cdd ${m}' # SSH shortcuts alias sshex='ssh example.com' # etc... # Diskspace alias du1='du -h --max-depth=1' # Easynews alias ez='wget --http-user=user --http-passwd=password' # BT # Music # web server specific # alias webcount="ps auxw | grep apache | grep -v grep | wc -l" alias webcount='ps -ef | grep httpd | wc -l' alias status='lynx --dump http://localhost/server-status | more' alias tl='tail -f /var/log/apache/access.log' alias te='tail -f /var/log/apache/error.log' # CVS export CVS_RSH=ssh export CVSROOT=example.com/cvs # JAVA JAVA_HOME=/usr/lib/Java/Home export JAVA_HOME ### etc, etc, etc... ###