Re: [Hampshire] restoring Mozilla Thunderbird and Firefox fr…

Top Page

Reply to this message
Author: Jacqui Caren
Date:  
To: Hampshire LUG Discussion List
Subject: Re: [Hampshire] restoring Mozilla Thunderbird and Firefox from backup
Lisi wrote:
> Next question: what does
>
> root      4099  4055  0 17:33 pts/3    00:00:00 grep --color thunderbird


This is the grep process.

/bin/bash (or whatever shell you use) starts two processes off

'ps -ef'
and
'grep --color thunderbird'

with the output of the first piped inte the second.

I expect if you type
alias
you will see a line similar to
grep='grep --colour'
which explains where the ' --color' comes from.

[ Because the second process is running *when* the first is running
you have the grep process listed in the ps output. ]

The grep pattern 'thunderbird' matches itself and so you see the
grep process in the output.

This is why

ps -ef | grep somewordpattern | wc -l

usully returns one more than you expect.

I.e. the above would return ' 1 ' when thunderbird is not running
and two or more when it is running.