Creating a shortcut

  • Rabid Dog
  • Web Master
  • Web Master
  • User avatar
  • Posts: 3245
  • Loc: South Africa

Post 3+ Months Ago

Hi

This is probably gonna rank right up there with the dumbest questions around but I will ask it anyway

I have the files
/usr/share/tomcat/startup.sh
/usr/share/tomcate/shutdown.sh

Is there anyway to create a shortcut to these files that I can use inside the terminal? right now i have to type out the whole path, the best I could come up with was to set the environment variables
[root@oops ~]# $TOMCAT_START/startup.sh
[root@oops ~]# $TOMCAT_START/shutdown.sh


but would like something more along the lines of
[root@oops ~]# tomcat_start
[root@oops ~]# tomcat_stop


The tomcat package was manually installed so
service tomcat start
doesn't work

The OS is Fedora Core 4

Thanks for any docs or advice
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • Maedhros
  • Proficient
  • Proficient
  • User avatar
  • Posts: 325
  • Loc: Durham, England

Post 3+ Months Ago

You can use an alias, so you could put something like this in your ~/.bashrc file:

Code: [ Select ]
alias tomcat_start="/usr/share/tomcat/startup.sh"
alias tomcat_stop="/usr/share/tomcate/shutdown.sh"
  1. alias tomcat_start="/usr/share/tomcat/startup.sh"
  2. alias tomcat_stop="/usr/share/tomcate/shutdown.sh"
  • Rabid Dog
  • Web Master
  • Web Master
  • User avatar
  • Posts: 3245
  • Loc: South Africa

Post 3+ Months Ago

Dude you are a legend

Thanks

Post Information

  • Total Posts in this topic: 3 posts
  • Users browsing this forum: No registered users and 82 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.