Creating a shortcut

  • Rabid Dog
  • Web Master
  • Web Master
  • User avatar
  • Joined: May 21, 2004
  • Posts: 3229
  • Loc: South Africa
  • Status: Offline

Post July 7th, 2006, 5:48 am

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
Watch me grow
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post July 7th, 2006, 5:48 am

  • Maedhros
  • Proficient
  • Proficient
  • User avatar
  • Joined: Oct 31, 2004
  • Posts: 325
  • Loc: Durham, England
  • Status: Offline

Post July 7th, 2006, 6:04 am

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
  • Joined: May 21, 2004
  • Posts: 3229
  • Loc: South Africa
  • Status: Offline

Post July 7th, 2006, 6:19 am

Dude you are a legend

Thanks
Watch me grow

Post Information

  • Total Posts in this topic: 3 posts
  • Users browsing this forum: No registered users and 54 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
 
cron
 

© 2011 Unmelted, LLC. Ozzu® is a registered trademark of Unmelted, LLC.