# Useful aliases alias ..='cd ..' alias ...='cd ../..' alias ....='cd ../../..' alias p=pushd alias m=more alias h=history # Log into MySQL server if security is not a concern alias sqlroot="mysql -u root -prootpassword" # Useful Shell variables # show hostname and current working directory as command prompt export PS1="\h \W> " # Help navigating directories without the complete path. # When running "cd anydir", bash will try with "cd ./anydir", "cd ~/anydir", # "cd ~/docs/anydir", and "cd /tmp/anydir" until the first match is found export CDPATH=".:~:~/docs:/tmp" # Useful functions # simple reverse cp function qcp() { cp $2 $1 } # Convert Unix timestamp to a readable string, e.g., # "datex 1253057832" returns "Tue Sep 15 16:37:12 PDT 2009" function datex() { date -d @$1 }