bashrc 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. # .bashrc
  2. # Source global definitions
  3. if [ -f /etc/bashrc ]; then
  4. . /etc/bashrc
  5. fi
  6. configure_ecearth()
  7. {
  8. if [ `hostname` != "frontal1" ]; then
  9. echo "First, we move to frontal1..."
  10. touch .configure_ecearth
  11. ssh frontal1
  12. fi
  13. export EC_DEP=/projects/acad/ecearth/opt
  14. if [ -f $EC_DEP/modules ]; then
  15. source $EC_DEP/modules
  16. fi
  17. }
  18. # User specific aliases and functions
  19. if [ `hostname` = "frontal3" ]; then
  20. echo "Nothing to load..."
  21. fi
  22. if [ `hostname` = "frontal1" ]; then
  23. [[ -f .configure_ecearth ]] && configure_ecearth
  24. [[ -f .configure_ecearth ]] && rm .configure_ecearth
  25. fi
  26. # Path/variables
  27. # --------------
  28. export HOST=`uname -n`
  29. export HISTFILESIZE=6000
  30. export HISTSIZE=6000
  31. # Display
  32. # -------
  33. export PS1="\[\033[1;39m\]\u@\h\[\033[0;0m\] \t \[\033[0;34m\]\w \[\033[2;31m\]\# \[\033[0;0m\]> "
  34. # alias
  35. # -----
  36. if [ `uname` = "Linux" ] ; then
  37. alias df='df -hT'
  38. alias ls='ls --color -F'
  39. alias lo='ls -oh -F'
  40. alias cpa="cp -a"
  41. alias ps="ps --forest"
  42. else
  43. alias df='df -k'
  44. alias ls='ls -F'
  45. alias lo='ls -o -F'
  46. alias cpa="cp -rf"
  47. fi
  48. alias rm="rm -i"
  49. alias mv="mv -i"
  50. alias cp="cp -i"
  51. alias cd..="cd .."
  52. alias dc="cd"
  53. alias la='ls -a -o -F -l'
  54. alias sl='ls'
  55. alias l='ls -lh'
  56. alias ll='ls -o -F'
  57. alias lt='ls -l -s -t |more'
  58. alias m="less"
  59. alias h="history"