managing processes under linux



Author: anonymous
Date: Wed Oct 12 04:47:16 2005
Subject: managing processes under linux

How do I kill all processes that are owned by the current user but that are not associated with their current login tty.

I have to run ps before killing any processes and display the output on the screen and kill the required processes then re-run ps to display the processes left after the kill action.


Hate these ads?



Comments


Wed Oct 12 09:25:29 2005: Subject:   TonyLawrence
It depends on how you want to do this. You could use killall -i to do it interactively, or you simply write a script that picks up the "?" processes and kills them.



Something similar to

kill `ps x --deselect T -o pid`

maybe ?

Play with

for i in `ps x --deselect T -o pid` ; do ps -p $i; done

until you see what you want.



Add your comments




Enter your email address for automatic notification of new posts here
(be sure to whitelist 'feedburner.com' if you use spam filtering)

Or use any RSS reader

Delivered by FeedBurner





Views for this page
Today This Week This Month This Year  Overall
55115990 9,040

/Forum/anonymous27.html copyright October 2005 anonymous All Rights Reserved

Have you tried Searching this site?

Unix/Linux/Mac OS X support by phone, email or on-site: Support Rates

This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more. We appreciate comments and article submissions.

Publishing your articles here

More:
       - Forum




Unix/Linux Consultants


http://thatitguy.com Business networking servers, Linux and Unix experts. In business since 1997! Windows and Exchange to Samba and Scalix migration experts.


http://bcstechnology.net Full service Linux & UNIX systems integrator; Windows to UNIX/Linux Client-Server Specialist; Secure E-Mail & Website Hosting; Thoroughbred Software Developer; Custom Industrial Automation; Hardware & Electronics Experts; In Business Since 1985.


http://www.breakthru.com.au SCO (Openserver and Unixware), Unix, Solaris and Linux Consulting services including: Secure Networking Solutions; Linux based Firewalls; Backup Solutions; Secure Home to Office Network Setup; Phone, Remote and On-Site Support available - Satisfaction Guaranteed!



Twitter
  • Nov 23 13:01
    I need coffee before I will even open the door, never mind go out there. That's completely non-negotiable, by the way.
  • Nov 23 12:56
    It's COLD and my wife wants us to go work in the yard. Do you think I can have her arrested for cruelty? Probably not as she's going too.









Change Congress


Related Posts