On Wed, Aug 20, 2003 at 11:32:52AM -0500, Johnny Fulcrum wrote:
> On Wed, 20 Aug 2003 10:30:37 -0500, The Wandering Dru 
> <dru at druswanderings.net> wrote:
> 
> >Sam MacDonald wrote:
> >>I did (as root) ps -ef grep | sshd   (thank you Johnny Fulcrum)
> >>results
> >
> >The pipe "|" goes _before_ the grep command.  What this does is send the 
> >output of the ps command to grep to use as input.  Aahhhh, the beauty of 
> >*nix.
> 
> I should have said do a
> 
> ps -ef |grep -v grep|grep sshd

The only reason you would suggest an ugly hack like that is because you
didn't check the man page for the proper switch to ps.  It's right
there on line 50.

PROCESS SELECTION BY LIST
       -C           select by command name

So you can do `ps -C sshd` to see if you have any running.

Nate

_______________________________________________
TCLUG Mailing List - Minneapolis/St. Paul, Minnesota
http://www.mn-linux.org tclug-list at mn-linux.org
https://mailman.real-time.com/mailman/listinfo/tclug-list