Bash alias for the /usr/local/etc/rc.d/ folder

I want to create an alias in bash so that instead of having to type:

/usr/local/etc/rc.d/mysql-server start

I can instead type:

rcd mysql-server start

Is that possible and what would the syntax look like? I believe rc scripts need the full path every time to run otherwise I would have created a symlink to the folder in / already.

Thanks!
 
Probably a better way would be to create a short shell script to do the same thing. Give it a unique name (such as mysqlstart) and place the script in the /usr/local/sbin directory.

You could then accomplish what you wish just like typing a simple command.
 
Back
Top