Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Another way' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Another way
Authored by: rushmoom on Oct 23, '01 01:18:44PM
Here's another way that will also work: ps -auxl | grep emacs | awk '{print $2}' | xargs kill -9 This gets a listing of processes, greps for your search term (in this case emacs), prints the second column (the process id), and then pipes each of the pid's to kill. Note that the above command will attempt to kill *all* emacs processes. You could limit to your user name by inserting another grep: ps -auxl | grep username | grep emacs ....

[ Reply to This | # ]
Another way
Authored by: Pi on Oct 26, '01 10:25:55PM

I use this in aliases.mine:
alias fps ps axu | grep !:1 |grep -v grep

it returns in the case of fps init
root 1 0.0 0.1 1292 248 ?? SLs 0:00.07 /sbin/init
root 2 0.0 0.0 1300 140 ?? SL 0:01.11 /sbin/mach_init

then i can kill it with kill col2num or in extreme cases kill -9 col2num



[ Reply to This | # ]