I’ve moved on from ps aux | grep -i processname; kill PID. The Mac (along with many other Unix-likes) has two handy utilities: pgrep and pkill. pgrep does a case-insensitive search for processes matching the expression you provide, and returns all matching PIDs, one per line. pkill does the same search, but just kills the …
Tag Archives: bash
The bash function I should have written years ago
I bet you nine times out of ten when you mkdir whatever, the next thing you do is cd whatever. Add this to your bash profile. function mcd() { mkdir $1 cd $1 } Run mcd whatever at the shell prompt, and you’ll find yourself in a brand new directory called whatever.