Jan 8, 2009

RC service alias

A handy way to get an alias for the services installed on your UNIX box is the following script:
for service in `cd /etc/init.d/; ls -1`; do
alias "service-${service}"="/etc/init.d/${service}";
done
You can now access the service scripts with an alias which also work with command completion. So restart the network i.e. will be "service-network restart".

No comments: