my version of simple my.bashrc login script.


/ Published in: Bash
Save to your folder(s)

Usage: save the script to ~/scripts/my.bashrc and then source it in .bashrc.


Copy this code and paste it in your HTML
  1. #Bash shell startup script by Zemian Deng
  2.  
  3. #Setup: source this file in $HOME/.bashrc with following block
  4. #if [ -f ~/scripts/my.bashrc ]; then
  5. # . ~/scripts/my.bashrc
  6. #fi
  7.  
  8. export SVN_EDITOR=vim
  9. export JAVA_HOME=/opt/java
  10. export GROOVY_HOME=/opt/groovy
  11. export GRAILS_HOME=/opt/grails
  12. export MAVEN_HOME=/opt/maven
  13. export MAVEN2_HOME=/opt/maven2
  14. export ANT_HOME=/opt/ant
  15. export CATALINA_HOME=/opt/tomcat
  16.  
  17. export PATH=$HOME/scripts:\
  18. $JAVA_HOME/bin:\
  19. $GROOVY_HOME/bin:\
  20. $GRAILS_HOME/bin:\
  21. $MAVEN_HOME/bin:\
  22. $MAVEN2_HOME/bin:\
  23. $ANT_HOME/bin:\
  24. $CATALINA_HOME/bin:\
  25. /opt/javautil/bin:\
  26. $PATH
  27.  
  28. # System shell commands
  29. alias cp='cp -rvf'
  30. alias mv='mv -vf'
  31. alias ll='ls -l'
  32. alias la='ls -A'
  33. alias l='ls -CF'
  34. alias f='find . -name'
  35. alias s='sort'
  36. alias sdate='date +%d-%b-%Y'
  37. alias mdate='date +%d-%b-%Y_%H%M'
  38. alias ldate='date +%a_%d-%b-%Y_%H%M'
  39. alias psg='ps auxwww|grep -v grep | grep'
  40. alias hd='od -Ax -tx1z -v'
  41. alias printpath='readlink -f'
  42. alias tar='tar -vf'
  43. alias rsync='rsync -va'
  44. alias chmodx='chmod a+x'
  45. alias myip='nslookup `hostname`'
  46. alias reload='exec bash'
  47.  
  48. # Application specfic commands
  49. alias eclipse='/opt/eclipse/eclipse&'
  50. alias svnu='svn update'
  51. alias svnc='svn ci . -m'
  52. alias mvncreate='echo mvn archetype:create -DarchetypeArtifactId=maven-archetype-webapp -DgroupId=cnx -DartifactId=mywebapp'
  53. alias mvnc='mvn clean eclipse:clean'
  54. alias mvne='mvn eclipse:m2eclipse -Dwtpversion=1.5'
  55. alias mysqlr='mysql -u root'
  56. alias svns='svn st'
  57. alias svnc='svn commit . -m'
  58. alias svnu='svn update .'
  59. alias svna='$HOME/scripts/svnadd.groovy'
  60. alias svnr='$HOME/scripts/svnremove.groovy'
  61. alias m='mate'
  62. alias mb='mate $HOME/scripts/my.bashrc'
  63. alias ms='mate $HOME/scripts'
  64.  
  65. # Platform specific commands
  66. alias p='cd ~/Desktop/projects'
  67. alias cdopt='cd /opt'
  68. alias cdtom='cd /opt/tomcat'
  69. alias sshfirebird='ssh root@firebird'
  70. alias sshhub='ssh [email protected]'

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.