commandlinefu.com is the place to record those command-line gems that you return to again and again.
You can sign-in using OpenID credentials, or register a traditional username and password.
Subscribe to the feed for:
Did some research and found the previous command wrong, we don't kill a zombie but its parent. Just made some modifcation to khashmeshab's command.
This was done in csh.
just a leaner, smaller version. Love the original idea!
It identifies the parents of the Zombie processes and kill them. So the new parent of orphan Zombies will be the Init process and he is already waiting for reaping them. Be careful! It may also kill your useful processes just because they are not taking care and waiting for their children (bad parents!).
Tested on FreeBSD 8.1 and CSH. The scripts works correctly but the Zombies do not die! I hope it will run and function as expected in Linux and others.
After seeing the command you wish to repeat, just invoke it using the ! syntax.
Place the line above in your ~/.bahsrc file. Now every time you issue the 'vb' command, you invoke the vim editor to edit it, then source it so the changes take effect immediately.
* This mechanism is not working well if your .bashrc contains commands that should not be sourced more than once.
* This trick also work for your csh or tclsh users: place the following line in your ~/.cshrc file:
alias vc 'vim ~/.cshrc; source ~/.cshrc
Thank you adzap for pointing out the missing quote