[arch-general] manage starting and stopping processes with less typing

Denis A. Altoé Falqueto denisfalqueto at gmail.com
Tue Apr 13 16:11:17 EDT 2010


On Tue, Apr 13, 2010 at 4:58 PM, Flavio Costa <flavio.cdc at 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
-------------------------------------------


More information about the arch-general mailing list