1 |
On 2019.08.22 12:31, Laurence Perkins wrote: |
2 |
> |
3 |
> |
4 |
> On Thu, 2019-08-22 at 10:03 +1000, Adam Carter wrote: |
5 |
> > On Thu, Aug 22, 2019 at 5:48 AM james <garftd@×××××××.net> wrote: |
6 |
> > > On 8/16/19 12:44 PM, Jack wrote: |
7 |
> > > > ps auxf | grep systemd |
8 |
> > > |
9 |
> > > This is new turf for me. Upon issuing this command string I get:: |
10 |
> > > |
11 |
> > > # ps auxf | grep systemd |
12 |
> > > root 24947 0.0 0.0 13964 996 pts/6 S+ 15:43 0:00 |
13 |
> > > | | | \_ grep --colour=auto systemd |
14 |
> > > |
15 |
> > |
16 |
> > This is showing that the only process with systemd in its name is |
17 |
> the |
18 |
> > grep command itself; you could pass anything to grep and it will be |
19 |
> > found in the process list, eg; |
20 |
> > |
21 |
> > $ ps auxf | grep blah |
22 |
> > adam 52359 0.0 0.0 7708 940 pts/3 S+ 09:55 0:00 |
23 |
> > \_ grep --colour=auto blah |
24 |
> > |
25 |
> > So, there's no systemd process running on this system. |
26 |
> |
27 |
> A common tactic is to use grep twice: |
28 |
> ps auxf | grep -v grep | grep blah |
29 |
> |
30 |
> That strips out all instances of grep from the results. |
31 |
> Putting what you're searching for first is more efficient, but putting |
32 |
> it last keeps the colorized output intact. |
33 |
> |
34 |
> LMP |
35 |
I often deal with that by using the search function in my terminal |
36 |
(usually konsole) to highlight the term I'm actually looking for. |
37 |
> |