[TAG] Recording OpenCourseWare free lectures

Jason Creighton androflux at softhome.net
Wed Jun 30 04:09:08 MSD 2004


On Sun, 20 Jun 2004 17:01:36 -0400, 
"Jay R. Ashworth" <jra at baylink.com> wrote:

> On Sun, Jun 20, 2004 at 04:35:04PM -0400, Ben Okopnik wrote:
> > Well spotted, Thomas! I've got a script to do this that I've been using
> > for ages, "psgrep":
> > 
> > ```
> > #!/bin/bash
> > # Created by Ben Okopnik on Fri Dec  7 19:23:54 PST 2001
> > [ -z "$1" ] && { printf "${0##*/} <process_name>\n"; exit; }
> > 
> > ps aux|grep -v grep|grep "$1"
> > '''
> > 
> > So, my version of "urlclip" these days consists of almost exactly what
> > Jimmy proposed - with the exception of "psgrep" being used to catch the
> > mozilla process.
> 
> Mine is called psg -- I'm even lazier than you.  :-)

Err.....

``
NAME
       pgrep,  pkill  -  look  up  or signal processes based on name and other
       attributes


SYNOPSIS
       pgrep [-flvx] [-d delimiter] [-n|-o] [-P ppid,...] [-g pgrp,...]
            [-s sid,...] [-u euid,...] [-U uid,...] [-G gid,...]
            [-t term,...] [pattern]

       pkill [-signal] [-fvx] [-n|-o] [-P ppid,...] [-g pgrp,...]
            [-s sid,...] [-u euid,...] [-U uid,...] [-G gid,...]
            [-t term,...] [pattern]


DESCRIPTION
       pgrep looks through the currently running processes and lists the  pro-
       cess  IDs which matches the selection criteria to stdout.  All the cri-
       teria 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 pro-
       cess instead of listing them on stdout.
''

Jason Creighton




More information about the TAG mailing list