[Techtalk] Kill question

Laurel Fan laurel at sdf.lonestar.org
Thu Sep 18 11:57:35 EST 2003


On Thu, Sep 18, 2003 at 11:33:46AM -0700, Tabatha Marshall wrote:
> So if I can locate all the processes running by grepping my username, is
> there any way to kill this way too?  We have been reading everything
> over here to find the answer, but just aren't seeing it.  If not, are
> there any other ways that might make this easier on me?

Do you have the 'pkill' and 'pgrep' utilities?  From the manpage:

DESCRIPTION
       pgrep  looks  through  the currently running processes and
       lists the process IDs which matches the selection criteria
       to stdout.  All the criteria have to match.  For example,

       pgrep -u root sshd

       will  only  list  the  processes  called sshd AND owned by
       root.  On the other hand,

       pgrep -u root,daemon

       will list the processes owned by root OR daemon.

       pkill will send the specified signal (by default  SIGTERM)
       to each process instead of listing them on stdout.

OPTIONS

[...]

       -u euid,...
              Only  match  processes  whose  effective user ID is
              listed.  Either the numerical or  symbolical  value
              may be used.




-- 
laurel at sdf.lonestar.org
http://dreadnought.gorgorg.org


More information about the Techtalk mailing list