ps hax -o user | sort | uniq -c ps will list the processes, h will remove the header, -o user prints only the user column, sort sorts in alphabetical order, so uniq can count each occurrence and show the number of occurrences instead of all the occurrences themselves.
Viewing 1 to 3 of 3 items
How can I kill all processes from a certain user ?
ps -ax | grep <username> ps -ef | grep -v grep | grep sandipan ps displays the process table. efww is a group of options which affect how the process table is displayed. Read about them in the man page. | causes the standard output stream of ps to be piped into the following command’s Full Article…
Pkill.sh [Shell script to kill process by name]
In *nix the “kill” command needs to know the pid(process id) of the process to kill it. So i decided to code a bash script to kill a process by name : #!/bin/bash if [ $1 -eq “”]; then echo “Usage : ./pkill.sh <process name>” else get_proc=`ps -e -o pid,command | grep $1` echo $get_proc Full Article…