Re: manage starting and stopping processes with less typing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



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


[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux