0

So I'm using grep and regex in order to find a list of all the processes that end with windbidd:

ps -ef | grep "winbindd$"

My question is is there a way for me to do the opposite ergo find all the lines that DON"T end with the line windbidd?

1
  • -v, --invert-match Invert the sense of matching, to select non-matching lines. Jun 1, 2018 at 23:12

1 Answer 1

1

grep -v should do exactly this. From Grep's man page:

-v, --invert-match

Invert the sense of matching, to select non-matching lines.

For example:

ps -ef | grep -v 'winbindd$'

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.