• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Killing More than one process

 
rohan yadav
Ranch Hand
Posts: 156
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everyone,
I wanted to know how to kill more than one process in unix??
e.g- I have problem statement as
"Write a shell script to Kill all processes started from your login "
 
Tim Holloway
Saloon Keeper
Posts: 18300
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If all the processes had the same name, you could use "killall".

But as far as all created since time "X", I've never ever found a use for that. Usually I want to pick a root process and kill all its children, not kill possibly unrelated apps and services that are just minding their own business. Of course, one of my favorite apps to kill that way is Firefox, since its cache can get very, very greedy, and that's AFTER I put limits on it.
 
Stefan Wagner
Ranch Hand
Posts: 1923
Linux Postgres Database Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Something like this:
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic