killn alias
I just took 20 minutes to scratch a 3 year old itch. Ever since I started programming in unix, I have wanted a kill command that can kill by process name, instead of just pid.
Behold, the one-liner:
kill -9 `ps|grep $1|awk '{print $1}'`
I tossed this into a fill named killn, did a chmod +x killn
to make executable, and viola!
Now, you can run killn project1
to kill all processes named project1, for example the 8 billion zombie process you left behind when you were fucking around with shared memory.
Toss another one-liner into your .cshrc file to include a new path in your run-time environment ``.cshrc <- setenv PATH {$PATH}:/home/ugrad/cseibert/sbin`.