Which pgrep flag inverts the match, showing processes that do not match the pattern?

Prepare for the Red Hat Certified Systems Admin Exam EX200. Enhance your skills with interactive quizzes, flashcards, and detailed explanations. Ace your certification exam today!

Multiple Choice

Which pgrep flag inverts the match, showing processes that do not match the pattern?

Explanation:
In pgrep, you can flip what you’re selecting with the invert-match flag. This makes pgrep return processes whose names do not match the provided pattern, rather than those that do match. For example, using the invert flag with a pattern like ssh will list all processes whose names do not contain ssh. You can combine this with other options (like filtering by user or limiting to the newest process), but the essential idea is that this flag reverses the match logic to show non-matching processes.

In pgrep, you can flip what you’re selecting with the invert-match flag. This makes pgrep return processes whose names do not match the provided pattern, rather than those that do match. For example, using the invert flag with a pattern like ssh will list all processes whose names do not contain ssh. You can combine this with other options (like filtering by user or limiting to the newest process), but the essential idea is that this flag reverses the match logic to show non-matching processes.

Subscribe

Get the latest from Passetra

You can unsubscribe at any time. Read our privacy policy