Question

Given that exactly 4 'httpd' processes are currently running on a Linux system, what will the command 'ps aux | grep httpd | wc -l' most likely output, and why?

A 4, because grep only matches actual running processes and automatically excludes itself
B 8, because ps aux lists each running process twice, once for the parent and once for the child
C 0, because piping the output of ps aux through grep suppresses all matching output
D 5, because the wc -l command always adds one extra line to account for a header row
E 5, because the grep command itself, containing the string 'httpd' in its own command line, is also matched by the pattern and counted
Practice Next

Hey! Ask a query

🎓
Think You're Ready for RBI Grade B?
RBI Grade B 2026 Phase 1 Memory Based Paper
  • 200 Questions with Detailed Solutions
  • Section-wise Coverage (GA, English, Quant & Reasoning)