On Tue, Apr 13, 2010 at 4:58 PM, Flavio Costa <flavio.cdc@gmail.com> wrote:
What about that: for i in $(ls -1 /etc/rc.d); do alias rc-$i="/etc/rc,d/$i"; done That's simple and dynamic, just insert it on your .bashrc ou /etc/bash.bashrc (global)
That has a problem. It is evaluated when you log in (or when you source .bashrc explicitly). But if you keep a session long enough and install a package with a file in /etc/rc.d, you will not have a corresponding alias rc-<new service>. So you have to log out and in again to get it. I think that the best approach was from Gaurish Sharma. The funcions are really dynamic and work pretty well (I thought of contributing something similar, but he did it first. My compliments for Gaurish, by the way). -- A: Because it obfuscates the reading. Q: Why is top posting so bad? ------------------------------------------- Denis A. Altoe Falqueto -------------------------------------------