On Wed, 2003-08-20 at 20:49, Shawn wrote:
> On 20 Aug 2003 17:31:09 -0500
> Tom Penney <blots at visi.com> wrote:
> 
> > 
> > I kind of like your hack. What if you don't know the name of the
> > command but know it contains ssh.
> > ps -ef |grep -v grep|grep ssh   - Works
> > ps -C ssh   - Does Not
> > 
> 
> why not just the old Unix favorite (well, at least mine):
> 
> ps -ef|grep ssh
> 
> Why bother with the grep -v and such when all you're doing is checking for a running process visually?  If you're using a script and don't want to see the pid of the grep then it's fine, IMO.
> 
> Less typing at times is better.

Because someone mentioned "ps -ef|grep ssh" also lists the process for
"grep ssh". The question was How do I see if sshd is running? 
 
On Wed, 2003-08-20 at 10:24, Sam MacDonald wrote: 
> 
> I did (as root) ps -ef grep | sshd   (thank you Johnny Fulcrum)
>     results
> root   27813 27782   0:09:04  tty1  00:00:00:  grep sshd
> 
> This is where I get lost because I don't know how to interpret the 
> output of grep so...

you and I know that this means sshd is not running but it is confusing
to someone new to linux.

-- 
Tom Penney <blots at visi.com>


_______________________________________________
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